:root {
  --ink: #132238;
  --ink-soft: #3a4f66;
  --paper: #f3f6f9;
  --paper-2: #e7eef5;
  --line: rgba(30, 58, 95, 0.14);
  --accent: #c8921a;
  --accent-deep: #9a6d0c;
  --navy: #1e3a5f;
  --teal: #2f6f8f;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(19, 34, 56, 0.12);
  --font-display: "Syne", sans-serif;
  --font-body: "Figtree", sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(47, 111, 143, 0.18), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(200, 146, 26, 0.12), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  min-height: 100vh;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  backdrop-filter: blur(14px);
  background: rgba(243, 246, 249, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(243, 246, 249, 0.92);
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.25rem;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--navy);
}

.hero {
  min-height: calc(100svh - 4.2rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2rem, 6vw, 4rem);
  max-width: calc(var(--max) + 5rem);
  margin: 0 auto;
}

.hero-copy {
  max-width: 34rem;
  animation: rise 0.9s ease both;
}

.brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--navy);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--teal);
}

.lede {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 32rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background: #16304f;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--navy);
}

.hero-visual {
  position: relative;
  min-height: min(62vh, 560px);
  animation: fade-in 1.2s ease 0.15s both;
}

.mesh {
  width: 100%;
  height: 100%;
  filter: drop-shadow(var(--shadow));
}

.nodes .n {
  transform-origin: center;
  animation: pulse 3.6s ease-in-out infinite;
}

.n1 { animation-delay: 0s; }
.n2 { animation-delay: 0.25s; }
.n3 { animation-delay: 0.5s; }
.n4 { animation-delay: 0.75s; }
.n5 { animation-delay: 1s; }
.n6 { animation-delay: 1.2s; }
.n7 { animation-delay: 1.4s; }
.n8 { animation-delay: 0.35s; }
.n9 { animation-delay: 0.9s; }
.n10 { animation-delay: 1.1s; }
.n11 { animation-delay: 0.6s; }

.lines {
  stroke-dasharray: 8 10;
  animation: dash 18s linear infinite;
}

.section {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 4vw, 2.5rem);
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
}

.project {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.project.is-visible {
  opacity: 1;
  transform: none;
}

.project.featured {
  padding-top: 0;
  border-top: 0;
  margin-bottom: 0.5rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
}

.project h3 {
  margin: 0.35rem 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.project p {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--navy);
  background: rgba(30, 58, 95, 0.08);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.stack-list li::before {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.4rem;
  vertical-align: middle;
}

.text-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(30, 58, 95, 0.35);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.text-link:hover {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}

.timeline li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.timeline li.is-visible {
  opacity: 1;
  transform: none;
}

.when {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--teal);
}

.what h3 {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.org {
  margin: 0 0 0.45rem;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
}

.what p:last-child {
  margin: 0;
  color: var(--ink-soft);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 2rem;
  margin: 0;
}

.skill-grid > div {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.skill-grid dt {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.skill-grid dd {
  margin: 0;
  color: var(--ink-soft);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.5rem;
}

.contact-links a {
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
  border-bottom: 1px solid rgba(30, 58, 95, 0.3);
}

.contact-links a:hover {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

.site-footer {
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 3rem;
  max-width: var(--max);
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@keyframes dash {
  to { stroke-dashoffset: -240; }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2.5rem;
  }

  .hero-visual {
    order: -1;
    min-height: 280px;
    max-width: 420px;
    margin: 0 auto;
  }

  .project-grid,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

@media (max-width: 640px) {
  .nav {
    display: none;
  }

  .brand {
    font-size: clamp(2.2rem, 11vw, 3rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy,
  .hero-visual,
  .project,
  .timeline li,
  .nodes .n,
  .lines {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
