/* ─────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────── */
:root {
  /* Palette */
  --bg:          #F5F2ED;       /* warm off-white — not clinical */
  --bg-card:     #FDFCF9;
  --ink:         #0D0D0D;       /* near-black */
  --ink-2:       #3A3A3A;
  --muted:       #7A7770;
  --rule:        #DDD9D2;
  --accent:      #0057FF;       /* electric blue — the ONLY color accent */
  --accent-dim:  rgba(0,87,255,.10);

  /* Neo-brutalist shadow (buttons only) */
  --brut-shadow: 3px 3px 0px var(--ink);
  --brut-shadow-hover: 1px 1px 0px var(--ink);

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --max: 1020px;
  --nav-h: 70px;
}

/* ─────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Subtle paper grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

/* ─────────────────────────────────────────────
   NAV — Apple Liquid Glass pill
───────────────────────────────────────────── */
.nav-wrap {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  pointer-events: none;
}

.nav-pill {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.55);

  /* Liquid glass layers */
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.72) 0%,
      rgba(245,242,237,0.52) 100%
    );
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);

  /* Specular highlight on top edge */
  box-shadow:
    0 1px 0 rgba(255,255,255,0.90) inset,
    0 -1px 0 rgba(0,0,0,0.06) inset,
    0 8px 32px rgba(0,0,0,0.10),
    0 2px 8px  rgba(0,0,0,0.06);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--ink);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-2);
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover {
  background: rgba(0,0,0,0.06);
  color: var(--ink);
}
.nav-link.active {
  color: var(--ink);
  font-weight: 500;
  background: rgba(0,0,0,0.07);
}

.nav-cta {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--ink);
  padding: 7px 16px;
  border-radius: 999px;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.nav-cta:hover { opacity: 0.82; }

/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 28px 60px;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;

  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.6s 0.1s cubic-bezier(.2,.9,.2,1) forwards;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(72px, 12vw, 148px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 28px;

  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s 0.18s cubic-bezier(.2,.9,.2,1) forwards;
}

.hero-line {
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 300;
  color: var(--ink-2);
  max-width: 46ch;
  line-height: 1.55;

  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.6s 0.30s cubic-bezier(.2,.9,.2,1) forwards;
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 56px;

  opacity: 0;
  animation: fadeUp 0.6s 0.52s ease forwards;
}

.scroll-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-line {
  width: 48px;
  height: 1px;
  background: var(--rule);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: scanLine 1.8s 1s ease-in-out infinite;
}

/* ─────────────────────────────────────────────
   SECTION COMMONS
───────────────────────────────────────────── */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--rule);
}

.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.section-heading em {
  font-style: italic;
  color: var(--accent);
}

/* ─────────────────────────────────────────────
   ABOUT
───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.about-body {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 40px;
}

.stat-row {
  display: flex;
  gap: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ─────────────────────────────────────────────
   PROJECT CARDS
───────────────────────────────────────────── */
.projects-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project-card {
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 32px;
  align-items: start;
  transition: background 0.15s;
  position: relative;
}
.project-card:last-child { border-bottom: 1px solid var(--rule); }

/* Blue left accent line on hover */
.project-card::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s cubic-bezier(.2,.9,.2,1);
}
.project-card:hover::before { transform: scaleY(1); }

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 3px;
}

.project-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-year {
  font-size: 13px;
  color: var(--muted);
}

.project-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  line-height: 1.1;
}

.project-desc {
  font-size: 15px;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1.7;
  max-width: 56ch;
}

.project-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  padding-top: 3px;
}

.project-skills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ─────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────── */

/* Neo-brutalist: solid border + hard offset shadow */
.btn-brutalist {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg-card);
  border: 1.5px solid var(--ink);
  padding: 9px 16px;
  border-radius: 6px;
  box-shadow: var(--brut-shadow);
  transition:
    box-shadow 0.12s ease,
    transform 0.12s ease;
  white-space: nowrap;
}
.btn-brutalist:hover {
  box-shadow: var(--brut-shadow-hover);
  transform: translate(2px, 2px);
}

/* Primary CTA */
.btn-primary {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 13px 26px;
  border-radius: 6px;
  box-shadow: var(--brut-shadow);
  transition:
    box-shadow 0.12s ease,
    transform 0.12s ease;
}
.btn-primary:hover {
  box-shadow: var(--brut-shadow-hover);
  transform: translate(2px, 2px);
}

/* Ghost link */
.btn-ghost {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.btn-ghost:hover { color: var(--accent); }

/* ─────────────────────────────────────────────
   SKILL TAGS
───────────────────────────────────────────── */
.skill-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--rule);
  padding: 4px 10px;
  border-radius: 4px;
}

/* ─────────────────────────────────────────────
   SKILLS STRIP
───────────────────────────────────────────── */
.skills-strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
  overflow: hidden;
}

.skills-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.skills-inner .dot { color: var(--rule); user-select: none; }

/* ─────────────────────────────────────────────
   CTA BAND
───────────────────────────────────────────── */
.cta-band {
  padding: 100px 0;
  border-top: 1px solid var(--rule);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

/* ─────────────────────────────────────────────
   PAGE HERO (inner pages)
───────────────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 70px) 0 60px;
  border-bottom: 1px solid var(--rule);
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin: 12px 0 20px;
}
.page-title em { font-style: italic; color: var(--accent); }

.page-sub {
  font-size: 17px;
  font-weight: 300;
  color: var(--ink-2);
  max-width: 52ch;
  line-height: 1.65;
}

/* ─────────────────────────────────────────────
   WORK PAGE
───────────────────────────────────────────── */
.work-block {
  padding: 48px 0;
}

.work-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.work-role-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}

.work-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.work-period {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 6px;
}

.work-desc {
  font-size: 16px;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1.75;
  max-width: 66ch;
  margin-bottom: 28px;
}

.work-proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.proof-thumb {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--rule);
  cursor: pointer;
  background: none;
  padding: 0;
  transition: border-color 0.15s;
}
.proof-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.proof-thumb:hover { border-color: var(--accent); }
.proof-thumb:hover img { transform: scale(1.03); }

.proof-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13,13,13,0.52);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.15s;
}
.proof-thumb:hover .proof-label { opacity: 1; }

.work-skills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────
   CONTACT PAGE
───────────────────────────────────────────── */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
  transition: background 0.12s;
}
.contact-card:last-child { border-bottom: 1px solid var(--rule); }
.contact-card:hover .contact-arrow { color: var(--accent); transform: translateX(4px); }

.contact-icon {
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  color: var(--ink);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.contact-platform {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-handle {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}

.contact-arrow {
  font-size: 20px;
  color: var(--muted);
  transition: color 0.15s, transform 0.15s;
}

/* ─────────────────────────────────────────────
   LIGHTBOX
───────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.lightbox:not([aria-hidden="true"]) {
  opacity: 1;
  pointer-events: all;
}
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13,13,13,.7);
  backdrop-filter: blur(8px);
}
.lb-panel {
  position: relative;
  width: min(1100px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  background: var(--bg-card);
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.22);
}
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
}
.lb-counter { font-size: 13px; color: var(--muted); }
.lb-btns { display: flex; gap: 8px; }
.lb-btns button {
  width: 34px; height: 34px;
  border: 1.5px solid var(--ink);
  background: var(--bg-card);
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--brut-shadow);
  transition: box-shadow 0.1s, transform 0.1s;
}
.lb-btns button:hover {
  box-shadow: var(--brut-shadow-hover);
  transform: translate(2px,2px);
}
.lb-img {
  width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  display: block;
}

/* ─────────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────────── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scanLine {
  0%   { left: -100%; }
  50%  { left: 100%; }
  100% { left: 100%; }
}

/* scroll-triggered reveals */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.65s cubic-bezier(.2,.9,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .project-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .project-footer { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .cta-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
  .work-header { flex-direction: column; gap: 8px; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .container { padding: 0 18px; }
  .stat-row { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-eyebrow, .hero-name, .hero-line, .scroll-cue { animation: none; opacity: 1; transform: none; }
  .reveal { transition: none; }
  .scroll-line::after { animation: none; }
}
