/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ════════════════════════════════════
   DESIGN TOKENS — Apple Style Reference
   Light · SF Pro · Three-blue system
════════════════════════════════════ */
:root {
  /* Colors */
  --blue:       #0071e3;   /* filled action buttons only */
  --blue-link:  #0066cc;   /* outlined actions, ghost links */
  --blue-sig:   #2997ff;   /* decorative, italic role label */
  --carbon:     #1d1d1f;   /* primary text */
  --frost:      #f5f5f7;   /* page canvas, section default */
  --ice:        #f4f8fb;   /* elevated surface wash */
  --ash:        #707070;   /* muted text, footer links */
  --mist:       #858585;   /* captions, meta */
  --divider:    #d2d2d7;   /* hairline rules */
  --pebble:     #e2e2e5;   /* tag fills, disabled surfaces */

  /* Typography — SF Pro on Apple, system-ui elsewhere */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          system-ui, "Helvetica Neue", Helvetica, sans-serif;

  /* Type scale with Apple letter-spacing values */
  --sz-caption: 12px;  --lh-caption: 1.33;  --ls-caption: -0.264px;
  --sz-sm:      14px;  --lh-sm:      1.29;  --ls-sm:      -0.224px;
  --sz-body:    17px;  --lh-body:    1.47;  --ls-body:    -0.272px;
  --sz-sub:     21px;  --lh-sub:     1.24;  --ls-sub:     -0.105px;
  --sz-h3:      28px;  --lh-h3:      1.18;  --ls-h3:       0.196px;
  --sz-h2:      40px;  --lh-h2:      1.14;  --ls-h2:       0.44px;
  --sz-h1:      56px;  --lh-h1:      1.07;  --ls-h1:       0.616px;

  /* Radii — ONLY these two values */
  --r-card:  8px;
  --r-pill:  980px;

  /* Shadows — product images only, never on UI */
  --shadow-product: rgba(0, 0, 0, 0.22) 3px 5px 30px 0px;

  /* Easing */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* Layout */
  --max-page: 1440px;
  --max-text: 980px;

  color-scheme: light;
}

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--frost);
  color: var(--carbon);
  font-size: var(--sz-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
img  { display: block; max-width: 100%; }

::selection { background: var(--blue); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--divider); border-radius: 3px; }

/* ── Skip Link ── */
.skip-link {
  position: fixed;
  top: 0; left: 1rem;
  z-index: 200;
  background: var(--blue);
  color: #fff;
  font-family: var(--font);
  font-size: var(--sz-sm);
  padding: 0.5rem 1.25rem;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform 150ms var(--ease-out);
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ════════════════════════════════════
   BUTTONS
   980px radius · three variants · no shadows
════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: var(--sz-body);
  font-weight: 400;
  letter-spacing: var(--ls-body);
  line-height: 1;
  border-radius: var(--r-pill);
  padding: 11px 20px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 140ms ease;
}

.btn:hover  { opacity: 0.84; }
.btn:active { opacity: 0.68; transform: scale(0.98); transition-duration: 80ms; }

.btn-filled {
  background: var(--blue);
  color: #fff;
}

.btn-outlined {
  background: transparent;
  color: var(--blue-link);
  border: 1px solid var(--blue-link);
}

.ghost-link {
  font-size: var(--sz-body);
  color: var(--blue-link);
  text-decoration: none;
  transition: text-decoration 120ms ease;
}
.ghost-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ════════════════════════════════════
   NAVIGATION
   Frosted glass · sticky 52px · single line
════════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 52px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
}

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  font-size: var(--sz-caption);
  font-weight: 600;
  color: var(--carbon);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  justify-self: start;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
}

.nav-links a {
  font-size: var(--sz-caption);
  font-weight: 400;
  color: var(--carbon);
  letter-spacing: var(--ls-caption);
  padding: 0.4rem 0.875rem;
  border-radius: var(--r-pill);
  transition: background 150ms ease;
  white-space: nowrap;
}
.nav-links a:hover { background: rgba(0, 0, 0, 0.06); }

.nav-cta {
  font-size: var(--sz-caption);
  padding: 7px 14px;
  justify-self: end;
}

/* ── Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  justify-self: end;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--carbon);
  transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}
.hamburger.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ── Mobile Menu ── */
.mobile-menu {
  display: flex;
  position: fixed;
  top: 52px; left: 0; right: 0; bottom: 0;
  z-index: 99;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  flex-direction: column;
  justify-content: center;
  padding: 3rem 24px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms var(--ease-out), visibility 0ms linear 220ms;
}
.mobile-menu.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 220ms var(--ease-out), visibility 0ms;
}
.mobile-menu ul { display: flex; flex-direction: column; }
.mobile-menu a {
  display: block;
  font-size: clamp(2rem, 9vw, 3.5rem);
  font-weight: 600;
  color: var(--carbon);
  letter-spacing: -0.02em;
  line-height: 1.1;
  padding: 0.6rem 0;
  border-bottom: 0.5px solid var(--divider);
  transition: color 120ms ease;
}
.mobile-menu ul li:last-child a { border-bottom: none; }
.mobile-menu a:hover { color: var(--blue); }

/* ════════════════════════════════════
   HERO
   Full-bleed frost · centered · staggered entrance
════════════════════════════════════ */
#hero {
  background: var(--frost);
  padding-top: 52px;
  text-align: center;
}

.hero-text {
  padding: 80px 24px 100px;
  max-width: var(--max-text);
  margin: 0 auto;
}

.hero-name {
  font-size: clamp(40px, 7vw, var(--sz-h1));
  font-weight: 600;
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
  color: var(--carbon);
  margin-bottom: 16px;
}

.hero-role {
  font-size: var(--sz-sub);
  font-weight: 400;
  font-style: italic;
  line-height: var(--lh-sub);
  letter-spacing: var(--ls-sub);
  color: var(--blue-sig);
  margin-bottom: 12px;
}

.hero-tagline {
  font-size: var(--sz-sub);
  font-weight: 300;
  line-height: var(--lh-sub);
  letter-spacing: var(--ls-sub);
  color: var(--carbon);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero entrance — only fires once JS adds .hero-anim to <body> */
.hero-anim .hero-name    { animation: fade-up 0.65s cubic-bezier(0.23, 1, 0.32, 1) 0.08s both; }
.hero-anim .hero-role    { animation: fade-up 0.65s cubic-bezier(0.23, 1, 0.32, 1) 0.22s both; }
.hero-anim .hero-tagline { animation: fade-up 0.65s cubic-bezier(0.23, 1, 0.32, 1) 0.36s both; }
.hero-anim .hero-actions { animation: fade-up 0.65s cubic-bezier(0.23, 1, 0.32, 1) 0.50s both; }

.hero-anim .hero-name,
.hero-anim .hero-role,
.hero-anim .hero-tagline,
.hero-anim .hero-actions {
  opacity: 0;
}

/* ════════════════════════════════════
   SECTIONS
════════════════════════════════════ */
.section { padding: 80px 24px; }
.section-white { background: #ffffff; }
.section-frost { background: var(--frost); }

.section-col {
  max-width: var(--max-text);
  margin: 0 auto;
  text-align: center;
}

/* ── Type ── */
.heading {
  font-size: clamp(28px, 4vw, var(--sz-h2));
  font-weight: 600;
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  color: var(--carbon);
  margin-bottom: 24px;
}

.heading-display {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.44px;
  color: var(--carbon);
  margin-bottom: 16px;
}

.body-text {
  font-size: var(--sz-body);
  font-weight: 400;
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--carbon);
  max-width: 60ch;
  margin: 0 auto 20px;
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Tags / Pills ── */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag-row-center { justify-content: center; }

.tag {
  display: inline-block;
  font-size: var(--sz-caption);
  font-weight: 400;
  color: var(--carbon);
  letter-spacing: var(--ls-caption);
  line-height: 1;
  border: 0.5px solid var(--divider);
  border-radius: var(--r-pill);
  padding: 5px 13px;
  background: transparent;
}

/* Glass tags on light card backgrounds */
.tag-glass {
  color: var(--carbon);
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.55);
}

/* ════════════════════════════════════
   ABOUT
════════════════════════════════════ */
.about-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 0.5px solid var(--divider);
}

.stat { text-align: center; }

.stat-number {
  display: block;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: var(--ls-h2);
  color: var(--carbon);
  line-height: 1.1;
}

.stat-label {
  display: block;
  font-size: var(--sz-caption);
  font-weight: 400;
  color: var(--ash);
  letter-spacing: var(--ls-caption);
  margin-top: 4px;
}

/* ════════════════════════════════════
   SKILLS
════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
  margin-top: 40px;
  text-align: left;
}

.skill-group-label {
  font-size: var(--sz-caption);
  font-weight: 600;
  color: var(--carbon);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ════════════════════════════════════
   EXPERIENCE
   Left-aligned typographic timeline
════════════════════════════════════ */
.exp-list {
  margin-top: 40px;
  text-align: left;
}

.exp-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 0.5px solid var(--divider);
}
.exp-item:last-child { border-bottom: none; }

.exp-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.exp-period {
  font-size: var(--sz-caption);
  font-weight: 400;
  color: var(--ash);
  letter-spacing: var(--ls-caption);
}

.exp-location {
  font-size: var(--sz-caption);
  color: var(--mist);
  letter-spacing: var(--ls-caption);
}

.exp-role {
  font-size: var(--sz-h3);
  font-weight: 600;
  letter-spacing: var(--ls-h3);
  line-height: var(--lh-h3);
  color: var(--carbon);
  margin-bottom: 4px;
}

.exp-org {
  font-size: var(--sz-sm);
  color: var(--ash);
  letter-spacing: var(--ls-sm);
  margin-bottom: 16px;
}

.exp-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.exp-bullets li {
  font-size: var(--sz-body);
  color: var(--carbon);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  padding-left: 16px;
  position: relative;
}

.exp-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue);
}

/* ════════════════════════════════════
   PROJECTS — Service Card Grid
   6 cards 2-col · full-bleed photo · 8px radius
════════════════════════════════════ */
.section-projects {
  padding-left: 0;
  padding-right: 0;
}

.section-projects .section-col {
  padding: 0 24px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: var(--max-page);
  margin: 24px auto 0;
  padding: 0 24px;
}

.project-card {
  position: relative;
  display: block;
  border-radius: var(--r-card);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background-color: var(--card-bg, #111);
  background-image: var(--card-img);
  background-size: cover;
  background-position: center;
  transition: transform 300ms var(--ease-out);
}
.project-card:hover { transform: scale(1.015); }

.project-card-links {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.project-card-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.0) 0%,
    rgba(255, 255, 255, 0.0) 38%,
    rgba(255, 255, 255, 0.97) 72%,
    rgba(255, 255, 255, 1.0) 100%
  );
}

.project-card-top {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
}

.section-projects .heading {
  color: #000000;
}

.project-badge {
  font-size: var(--sz-caption);
  font-weight: 400;
  color: #fff;
  background: rgba(0, 113, 227, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  letter-spacing: var(--ls-caption);
}

.project-link-pill {
  font-size: var(--sz-caption);
  font-weight: 400;
  color: var(--carbon);
  background: rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 0.5px solid rgba(0, 0, 0, 0.18);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  text-decoration: none;
  letter-spacing: var(--ls-caption);
  transition: background 140ms ease;
}
.project-link-pill:hover { background: rgba(0, 0, 0, 0.13); }

.project-title {
  font-size: var(--sz-h3);
  font-weight: 600;
  color: var(--carbon);
  letter-spacing: var(--ls-h3);
  line-height: var(--lh-h3);
  margin-bottom: 6px;
}

.project-desc {
  font-size: var(--sz-sm);
  font-weight: 400;
  color: var(--ash);
  letter-spacing: var(--ls-sm);
  line-height: var(--lh-sm);
  margin-bottom: 10px;
}

/* ════════════════════════════════════
   EDUCATION — Typographic CTA Block
════════════════════════════════════ */
.edu-block {
  text-align: center;
  max-width: var(--max-text);
  margin: 0 auto;
  padding: 24px 0;
}

.edu-degree {
  font-size: var(--sz-sub);
  font-weight: 300;
  color: var(--carbon);
  letter-spacing: var(--ls-sub);
  line-height: var(--lh-sub);
  margin-bottom: 8px;
}

.edu-meta {
  font-size: var(--sz-body);
  font-weight: 400;
  color: var(--ash);
  letter-spacing: var(--ls-body);
  margin-bottom: 24px;
}

/* ════════════════════════════════════
   CONTACT
════════════════════════════════════ */
.contact-block {
  text-align: center;
  max-width: var(--max-text);
  margin: 0 auto;
  padding: 24px 0;
}

.contact-body {
  font-size: var(--sz-sub);
  font-weight: 300;
  color: var(--carbon);
  line-height: var(--lh-sub);
  letter-spacing: var(--ls-sub);
  max-width: 48ch;
  margin: 0 auto 32px;
}

.contact-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.contact-aux {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ════════════════════════════════════
   FOOTER
   Multi-column typographic · #f5f5f7
════════════════════════════════════ */
footer {
  background: var(--frost);
  border-top: 0.5px solid var(--divider);
  padding: 40px 24px;
}

.footer-inner {
  max-width: var(--max-page);
  margin: 0 auto;
}

.footer-top {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 0.5px solid var(--divider);
}

.footer-legal {
  font-size: var(--sz-caption);
  color: var(--ash);
  letter-spacing: var(--ls-caption);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col-label {
  font-size: var(--sz-caption);
  font-weight: 600;
  color: var(--carbon);
  letter-spacing: var(--ls-caption);
  margin-bottom: 4px;
}

.footer-link {
  font-size: var(--sz-caption);
  color: var(--ash);
  letter-spacing: var(--ls-caption);
  text-decoration: none;
  transition: color 120ms ease;
}
.footer-link:hover { color: var(--blue); }

/* ════════════════════════════════════
   KEYFRAMES
════════════════════════════════════ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ════════════════════════════════════
   REDUCED MOTION
════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .hero-anim .hero-name,
  .hero-anim .hero-role,
  .hero-anim .hero-tagline,
  .hero-anim .hero-actions {
    animation: none;
    opacity: 1;
  }

  .reveal {
    transition: opacity 200ms ease;
    transform: none !important;
  }
  .reveal.visible { opacity: 1; }

  .project-card         { transition: none; }
  .project-card:hover   { transform: none; }

  .btn                  { transition: none; }
  .hamburger span       { transition: none; }
  .mobile-menu,
  .mobile-menu.open     { transition: none; }

  .skip-link            { transition: none; }
}

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Nav */
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }

  /* Hero */
  .hero-text { padding: 56px 20px 72px; }
  .hero-br   { display: none; }

  /* Sections */
  .section { padding: 60px 20px; }

  /* About stats: wrap tightly */
  .about-stats { gap: 32px; }

  /* Skills */
  .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }

  /* Experience */
  .exp-item  { grid-template-columns: 1fr; gap: 6px; }
  .exp-meta  { flex-direction: row; gap: 16px; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; padding: 0 20px; }
  .project-card {
    aspect-ratio: auto;
    min-height: 380px;
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-position: center top;
  }
  .section-projects .section-col { padding: 0 20px; }

  /* Footer */
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .skills-grid  { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr; }
  .about-stats  { gap: 20px; }
}
