:root {
  --bg: #09111f;
  --bg-soft: #0f1a2b;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --text: #e5edf7;
  --muted: #9fb0c6;
  --accent: #7dd3fc;
  --accent-strong: #38bdf8;
  --shadow: 0 20px 50px rgba(2, 6, 23, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 30%),
    linear-gradient(180deg, #08101d 0%, #0c1728 100%);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 5.5rem 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(8, 16, 29, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap,
.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.nav-links a,
.contact-links a {
  color: var(--muted);
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.contact-links a:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
}

.hero-grid,
.section-grid,
.contact-card {
  display: grid;
  gap: 2rem;
}

.hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}

.hero h1,
.section-heading h2,
.contact-card h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.9rem, 6vw, 5.5rem);
}

.hero h2 {
  margin: 0.75rem 0 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  color: var(--muted);
  font-weight: 500;
}

.lead {
  margin: 1.2rem 0 0;
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 600;
}

.hero-text,
.card p,
.contact-card p {
  color: var(--muted);
}

.hero-text {
  max-width: 42rem;
  margin-top: 1rem;
}

.hero-portrait-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.hero-portrait-frame {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
}

.hero-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-portrait-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, rgba(125, 211, 252, 0.35), transparent);
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  border: 1px solid transparent;
}

.button:hover,
.card:hover {
  transform: translateY(-4px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #07111f;
}

.button-secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.hero-panel,
.skills-grid,
.projects-grid,
.experience-list {
  display: grid;
  gap: 1rem;
}

.hero-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.metric-card,
.contact-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card,
.metric-card {
  padding: 1.6rem;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.card:hover,
.metric-card:hover {
  border-color: rgba(125, 211, 252, 0.35);
  background: var(--panel-strong);
}

.metric-card .icon {
  display: inline-flex;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(125, 211, 252, 0.12);
  color: var(--accent);
  font-size: 1rem;
}

.metric-card h3,
.skill-card h3,
.project-card h3,
.experience-card h3 {
  margin: 1rem 0 0.5rem;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  max-width: 40rem;
}

.section-grid {
  grid-template-columns: 0.8fr 1.2fr;
  align-items: start;
}

.skills-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.skill-card ul {
  padding-left: 1rem;
  margin: 1rem 0 0;
  color: var(--muted);
}

.project-card,
.experience-card {
  height: 100%;
}

.project-card {
  overflow: hidden;
  padding: 0;
}

.project-card > *:not(.project-image-wrap) {
  margin-left: 1.6rem;
  margin-right: 1.6rem;
}

.project-card > :last-child {
  margin-bottom: 1.6rem;
}

.project-image-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(2, 6, 23, 0.7);
}

.project-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.25), transparent 55%);
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05);
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-github-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  background: rgba(125, 211, 252, 0.1);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.project-github-button:hover {
  transform: translateY(-2px);
  background: rgba(125, 211, 252, 0.16);
  border-color: rgba(125, 211, 252, 0.4);
  color: #ffffff;
}

.tag {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-meta {
  margin-top: 1rem;
  color: var(--text);
  font-size: 0.95rem;
}

.impact-box {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.experience-list {
  grid-template-columns: 1fr;
}

.contact-card {
  grid-template-columns: 1fr 0.8fr;
  padding: 2rem;
  align-items: center;
}

.contact-links {
  display: grid;
  gap: 0.85rem;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }

@media (max-width: 960px) {
  .hero-grid,
  .section-grid,
  .contact-card,
  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid,
  .section-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .nav-wrap,
  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 4.5rem 0;
  }

  .skills-grid,
  .projects-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 0.9rem;
    font-size: 0.95rem;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .contact-card,
  .card,
  .metric-card {
    padding: 1.35rem;
  }

  .hero-portrait-frame {
    width: 84px;
    height: 84px;
  }
}
