/* =====================================================
   styles.css

   EDITING GUIDE
   ─────────────
   • Colours / brand  → edit the :root block (dark) and
     [data-theme="light"] block (light) below.
   • Fonts            → swap the family names in :root AND
     update the <link> tags in index.html.
   • Max content width, nav height, section spacing
                      → the sizing vars in :root.
   • No colour hex values appear outside these two blocks.
   ===================================================== */


/* ─────────────────────────────────────────────────────
   RESET
   ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html                   { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body                   { min-height: 100dvh; }
img, svg               { display: block; max-width: 100%; }
button                 { cursor: pointer; font: inherit; border: none; background: none; }
a                      { color: inherit; text-decoration: none; }
ul, ol                 { list-style: none; }


/* ─────────────────────────────────────────────────────
   CUSTOM PROPERTIES  ·  dark theme = "Mocha" night mode
   (Sandstone, the light theme below, is the primary identity)
   ───────────────────────────────────────────────────── */
:root {
  /* ── Canvas ── warm espresso, layered warm-brown surfaces */
  --bg:       #17120D;
  --ink:      #1F1813;
  --ink2:     #261D16;
  --surface:  #2C2219;
  --surface2: #372A1E;

  /* ── Borders ── translucent warm light, two weights */
  --line:  rgba(255,247,235,0.08);
  --line2: rgba(255,247,235,0.15);

  /* ── Accent ── warm tan; --acc-rgb feeds glows/shadows, --acc-ink = text ON accent */
  --acc:      #CBA46A;
  --acc-rgb:  203,164,106;
  --acc-soft: rgba(var(--acc-rgb), 0.17);
  --acc-ink:  #1B1409;

  /* ── Secondary accent ── warm clay, used sparingly */
  --red:     #DDA07A;
  --red-ink: #2a160c;

  /* ── Text scale ── */
  --text:   #EFE7DB;  /* warm cream body / headings */
  --muted:  #A4917B;  /* secondary text */
  --muted2: #6E5F4F;  /* faint labels, captions */

  /* ── Typography ── */
  --font-display: 'Space Grotesk', sans-serif; /* headings */
  --font-body:    'Inter', sans-serif;        /* body / UI */
  --font-mono:    'Space Mono', monospace;    /* eyebrows, tags, dates */

  /* ── Layout ── */
  --max-w:      1100px;
  --nav-h:      72px;
  --section-py: clamp(5rem, 10vw, 9rem);

  /* ── Radius ── */
  --r-card: 16px;
  --r-lg:   20px;
  --r-tag:  999px;

  /* ── Shadows ── */
  --shadow-card: 0 46px 90px -34px rgba(0,0,0,0.9);
  --shadow-sm:   0 4px 24px rgba(0,0,0,0.45);
  --shadow-acc:  0 0 40px 8px rgba(var(--acc-rgb),0.18);

  /* ── Motion ── */
  --ease: cubic-bezier(0.4,0,0.2,1);
  --dur:  0.28s;
}


/* ─────────────────────────────────────────────────────
   LIGHT THEME  ·  "Sandstone" — the primary identity
   (beige canvas, espresso ink, terracotta accent)
   ───────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:       #E9DEC9;
  --ink:      #E2D6BF;
  --ink2:     #DACDB2;
  --surface:  #F7F0E2;
  --surface2: #F0E7D5;
  --line:     rgba(44,33,24,0.10);
  --line2:    rgba(44,33,24,0.18);

  --acc:      #A75F36;
  --acc-rgb:  167,95,54;
  --acc-soft: rgba(var(--acc-rgb), 0.13);
  --acc-ink:  #F8F1E6;

  --red:      #9C4F2E;
  --red-ink:  #F8F1E6;

  --text:     #2C2118;
  --muted:    #6F6151;
  --muted2:   #9A8B78;

  --shadow-card: 0 22px 60px -22px rgba(60,40,20,0.16);
  --shadow-sm:   0 4px 18px rgba(60,40,20,0.09);
  --shadow-acc:  0 0 30px 6px rgba(var(--acc-rgb), 0.12);
}


/* ─────────────────────────────────────────────────────
   BASE
   ───────────────────────────────────────────────────── */
body {
  font-family:            var(--font-body);
  font-size:              1rem;
  line-height:            1.7;
  color:                  var(--text);
  background:             var(--bg);
  -webkit-font-smoothing: antialiased;
  transition:             background var(--dur) var(--ease), color var(--dur) var(--ease);
}


/* ─────────────────────────────────────────────────────
   LAYOUT
   ───────────────────────────────────────────────────── */
.container {
  width:          100%;
  max-width:      var(--max-w);
  margin-inline:  auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: var(--section-py);
  position:      relative;
}


/* ─────────────────────────────────────────────────────
   TYPOGRAPHY HELPERS
   ───────────────────────────────────────────────────── */

/* Eyebrow: "01 — about" style labels above headings */
.eyebrow {
  font-family:     var(--font-mono);
  font-size:       clamp(0.95rem, 2vw, 1.2rem);
  font-weight:     700;
  letter-spacing:  0.16em;
  text-transform:  uppercase;
  color:           var(--acc);
  margin-bottom:   1rem;
}

.section__heading {
  font-family:    var(--font-display);
  font-size:      clamp(2rem, 5vw, 3.25rem);
  font-weight:    800;
  letter-spacing: -0.02em;
  line-height:    1.1;
  color:          var(--text);
  margin-bottom:  clamp(2.5rem, 5vw, 4rem);
}


/* ─────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────── */
.btn {
  display:         inline-flex;
  align-items:     center;
  gap:             0.5rem;
  padding:         0.75rem 1.875rem;
  border-radius:   var(--r-tag);
  font-family:     var(--font-body);
  font-size:       0.9375rem;
  font-weight:     600;
  white-space:     nowrap;
  transition:      transform var(--dur) var(--ease),
                   box-shadow var(--dur) var(--ease),
                   background var(--dur) var(--ease),
                   border-color var(--dur) var(--ease),
                   color var(--dur) var(--ease);
}
.btn:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

/* Primary — filled lavender */
.btn--primary {
  background:  var(--acc);
  color:       var(--acc-ink);
}
.btn--primary:hover {
  transform:   translateY(-2px);
  box-shadow:  var(--shadow-acc);
}

/* Ghost — bordered */
.btn--ghost {
  background:    transparent;
  color:         var(--text);
  border:        1px solid var(--line2);
}
.btn--ghost:hover {
  background:    var(--surface);
  border-color:  var(--acc);
  transform:     translateY(-2px);
}


/* ─────────────────────────────────────────────────────
   TAGS / CHIPS
   ───────────────────────────────────────────────────── */
.tag {
  display:        inline-block;
  padding:        0.25rem 0.75rem;
  border-radius:  var(--r-tag);
  border:         1px solid var(--line2);
  font-family:    var(--font-mono);
  font-size:      0.67rem;
  font-weight:    700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--muted);
  white-space:    nowrap;
}


/* ─────────────────────────────────────────────────────
   HEADER / NAV
   ───────────────────────────────────────────────────── */
.site-header {
  position:            fixed;
  inset:               0 0 auto 0;
  z-index:             200;
  height:              var(--nav-h);
  display:             flex;
  align-items:         center;
  background:          rgba(23,18,13,0.72);
  backdrop-filter:     blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom:       1px solid var(--line);
  transition:          background var(--dur) var(--ease),
                       border-color var(--dur) var(--ease);
}

[data-theme="light"] .site-header {
  background: rgba(233,222,201,0.82);
}

.site-header.scrolled {
  border-bottom-color: var(--line2);
}

.nav {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             1.5rem;
}

/* Logo mark */
.nav__logo { display: flex; align-items: center; }

.nav__logo-mark {
  font-family:    'Aref Ruqaa', 'Noto Naskh Arabic', serif;
  font-size:      1.85rem;
  font-weight:    700;
  line-height:    1;
  color:          var(--acc);
  transition:     opacity var(--dur);
}
.nav__logo:hover .nav__logo-mark { opacity: 0.75; }
.nav__logo:focus-visible          { outline: 2px solid var(--acc); border-radius: 4px; }

/* Desktop nav links */
.nav__links {
  display:     flex;
  align-items: center;
  gap:         0.25rem;
}

.nav__links a {
  font-size:    1.0625rem;
  font-weight:  500;
  color:        var(--muted);
  padding:      0.45rem 0.875rem;
  border-radius: var(--r-tag);
  transition:   color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav__links a:hover,
.nav__links a:focus-visible {
  color:       var(--text);
  background:  var(--surface);
}
.nav__links a:focus-visible { outline: 2px solid var(--acc); }

/* Actions row: theme toggle + hamburger */
.nav__actions {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
}

/* Theme toggle button */
.theme-toggle {
  width:         38px;
  height:        38px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  border-radius: 50%;
  color:         var(--muted);
  transition:    color var(--dur), background var(--dur);
}
.theme-toggle:hover        { color: var(--text); background: var(--surface); }
.theme-toggle:focus-visible { outline: 2px solid var(--acc); }

.icon { display: block; width: 18px; height: 18px; flex-shrink: 0; }

/* Show sun in dark mode (click → light), moon in light mode (click → dark) */
[data-theme="dark"]  .icon--moon { display: none; }
[data-theme="light"] .icon--sun  { display: none; }

/* Hamburger — only visible on mobile (see responsive block) */
.hamburger {
  display:         none;
  width:           38px;
  height:          38px;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  gap:             5px;
  border-radius:   8px;
  transition:      background var(--dur);
}
.hamburger:hover        { background: var(--surface); }
.hamburger:focus-visible { outline: 2px solid var(--acc); }

.hamburger span {
  display:       block;
  width:         20px;
  height:        2px;
  background:    var(--text);
  border-radius: 2px;
  transition:    transform 0.32s var(--ease), opacity 0.32s var(--ease);
}

/* Animate bars → X when menu is open */
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ─────────────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────────────── */
.hero {
  position:    relative;
  min-height:  100dvh;
  display:     flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow:    hidden;
}

/* Radial lavender glow — signature accent treatment.
   Many gradient stops + a soft blur dissolve the 8-bit colour banding
   that makes thin dark gradients look grainy/low-quality. */
.hero__glow {
  position:       absolute;
  top:            -15%;
  left:           50%;
  transform:      translateX(-50%);
  width:          min(960px, 130vw);
  height:         min(960px, 130vw);
  border-radius:  50%;
  background:     radial-gradient(
                    circle at 50% 42%,
                    rgba(var(--acc-rgb),0.26) 0%,
                    rgba(var(--acc-rgb),0.185) 14%,
                    rgba(var(--acc-rgb),0.115) 29%,
                    rgba(var(--acc-rgb),0.06) 45%,
                    rgba(var(--acc-rgb),0.025) 61%,
                    rgba(var(--acc-rgb),0.008) 76%,
                    transparent 88%
                  );
  filter:         blur(40px);
  pointer-events: none;
}

/* Faint Arabic-yeh watermark — echoes the favicon / share card.
   Sits behind the content (z-index 0); hero overflow:hidden clips the bleed. */
.hero__watermark {
  position:       absolute;
  right:          -0.08em;
  top:            50%;
  transform:      translateY(-50%);
  font-family:    'Aref Ruqaa', 'Noto Naskh Arabic', serif;
  font-weight:    700;
  font-size:      clamp(16rem, 46vw, 40rem);
  line-height:    1;
  color:          var(--acc);
  opacity:        0.07;
  pointer-events: none;
  user-select:    none;
  z-index:        0;
  white-space:    nowrap;
}

/* Sub-pixel dither — fine, near-invisible noise that breaks up the
   remaining gradient steps so the glow reads as smooth, not banded. */
.hero::after {
  content:          '';
  position:         absolute;
  inset:            0;
  z-index:          0;
  pointer-events:   none;
  opacity:          0.038;
  mix-blend-mode:   overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:  180px 180px;
}

.hero__inner {
  position:     relative;
  z-index:      1;
  padding-block: clamp(4rem, 10vw, 8rem);
}

.hero .eyebrow { margin-bottom: 1.5rem; }

.hero__name {
  font-family:    var(--font-display);
  font-size:      clamp(3.75rem, 12vw, 8.5rem);
  font-weight:    800;
  letter-spacing: -0.03em;
  line-height:    0.9;
  color:          var(--text);
  margin-bottom:  0.6rem;
}

.hero__name-ar {
  font-family:    'Aref Ruqaa', 'Noto Naskh Arabic', serif;
  font-size:      clamp(2rem, 5.5vw, 3.4rem);
  font-weight:    700;            /* 700 aligns the letters/diacritics correctly; 400 spaces them loosely */
  color:          var(--acc);     /* match the eyebrow accent colour */
  line-height:    1.35;
  margin-bottom:  clamp(1.5rem, 3vw, 2.25rem);
}

.hero__tagline {
  font-size:     clamp(1rem, 2.2vw, 1.175rem);
  color:         var(--muted);
  max-width:     50ch;
  line-height:   1.7;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.hero__cta {
  display:   flex;
  flex-wrap: wrap;
  gap:       1rem;
}

/* Slow accent pulse on the primary CTA — keeps motion long & tasteful */
@keyframes acc-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--acc-rgb),0); }
  50%       { box-shadow: 0 0 32px 8px rgba(var(--acc-rgb),0.20); }
}
.hero__cta .btn--primary { animation: acc-pulse 3s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .hero__cta .btn--primary { animation: none; }
}


/* ─────────────────────────────────────────────────────
   ABOUT
   ───────────────────────────────────────────────────── */
.about__grid {
  display:               grid;
  grid-template-columns: 1fr 270px;
  gap:                   clamp(2.5rem, 5vw, 5rem);
  align-items:           start;
}

.about__body {
  display:        flex;
  flex-direction: column;
  gap:            1.25rem;
}

.about__body p {
  font-size:   1.0625rem;
  color:       var(--muted);
  line-height: 1.8;
}

.about__body strong {
  color:       var(--text);
  font-weight: 600;
}

.about__photo-wrap { flex-shrink: 0; }

.about__photo {
  width:           100%;
  height:          auto;
  aspect-ratio:    3 / 4;
  object-fit:      cover;
  object-position: center top;
  border-radius:   var(--r-lg);
  border:          1px solid var(--line2);
  box-shadow:      var(--shadow-card), 0 0 0 5px var(--acc-soft);
  display:         block;
  background:      var(--surface); /* placeholder while loading */
}


/* ─────────────────────────────────────────────────────
   SKILLS
   ───────────────────────────────────────────────────── */
.skills__grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap:                   1.25rem;
}

.skill-card {
  background:    var(--surface);
  border:        1px solid var(--line);
  border-radius: var(--r-card);
  padding:       1.875rem;
  box-shadow:    var(--shadow-card);
  transition:    border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.skill-card:hover {
  border-color: var(--line2);
  transform:    translateY(-3px);
}

/* Dashed border + lowered opacity for the placeholder card */
.skill-card--placeholder {
  opacity:      0.4;
  border-style: dashed;
}

.skill-card__label {
  font-family:    var(--font-mono);
  font-size:      0.68rem;
  font-weight:    700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color:          var(--acc);
  margin-bottom:  1rem;
}

.skill-card__list {
  display:        flex;
  flex-direction: column;
  gap:            0.5rem;
}

.skill-card__list li {
  font-size:   0.9375rem;
  color:       var(--text);
  font-weight: 500;
  padding-left: 1.1em;
  position:    relative;
}

.skill-card__list li::before {
  content:       '';
  position:      absolute;
  left:          0;
  top:           0.62em;
  width:         5px;
  height:        5px;
  border-radius: 50%;
  background:    var(--acc);
  opacity:       0.55;
}


/* ─────────────────────────────────────────────────────
   PROJECTS
   ───────────────────────────────────────────────────── */
.projects__grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap:                   1.25rem;
}

.projects__loading,
.projects__error {
  color:       var(--muted2);
  font-family: var(--font-mono);
  font-size:   0.85rem;
  grid-column: 1 / -1;
  padding:     3rem;
  text-align:  center;
}

.project-card {
  background:    var(--surface);
  border:        1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow:    var(--shadow-card);
  transition:
    border-color var(--dur) var(--ease),
    transform    var(--dur) var(--ease),
    box-shadow   var(--dur) var(--ease);
  transition-delay: var(--delay, 0ms);
}
.project-card:hover {
  border-color: var(--line2);
  transform:    translateY(-4px);
  box-shadow:   var(--shadow-card), var(--shadow-acc);
}

/* Featured card: subtle accent tint + glow on hover */
.project-card--featured {
  border-color: var(--acc-soft);
  background:   linear-gradient(140deg, var(--surface) 55%, rgba(var(--acc-rgb),0.07));
}
.project-card--featured:hover { border-color: var(--acc); }

.project-card__inner {
  padding:        2rem;
  height:         100%;
  display:        flex;
  flex-direction: column;
  gap:            0.75rem;
}

/* "Featured" badge — filled accent pill */
.project-card__badge {
  align-self:     flex-start;
  font-family:    var(--font-mono);
  font-size:      0.63rem;
  font-weight:    700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color:          var(--acc-ink);
  background:     var(--acc);
  padding:        0.22rem 0.65rem;
  border-radius:  var(--r-tag);
}

.project-card__title {
  font-family:    var(--font-display);
  font-size:      1.125rem;
  font-weight:    700;
  letter-spacing: -0.01em;
  color:          var(--text);
  line-height:    1.3;
}

.project-card__desc {
  font-size:   0.9rem;
  color:       var(--muted);
  line-height: 1.7;
  flex:        1;
}

.project-card__footer {
  display:         flex;
  flex-wrap:       wrap;
  align-items:     flex-end;
  justify-content: space-between;
  gap:             0.75rem;
  margin-top:      auto;
  padding-top:     1rem;
  border-top:      1px solid var(--line);
}

.project-card__tags {
  display:   flex;
  flex-wrap: wrap;
  gap:       0.35rem;
}

.project-card__links {
  display:    flex;
  gap:        0.6rem;
  flex-shrink: 0;
}

.project-link {
  display:       inline-flex;
  align-items:   center;
  gap:           0.35rem;
  font-size:     0.8rem;
  font-weight:   600;
  color:         var(--muted);
  padding:       0.3rem 0.75rem;
  border-radius: var(--r-tag);
  border:        1px solid var(--line2);
  transition:    color var(--dur), border-color var(--dur), background var(--dur);
}
.project-link:hover {
  color:         var(--text);
  border-color:  var(--acc);
  background:    var(--acc-soft);
}
.project-link:focus-visible { outline: 2px solid var(--acc); }

.project-link--live         { color: var(--acc); border-color: var(--acc-soft); }
.project-link--live:hover   { color: var(--acc-ink); background: var(--acc); }


/* ─────────────────────────────────────────────────────
   EXPERIENCE / TIMELINE
   ───────────────────────────────────────────────────── */
.timeline {
  position:       relative;
  display:        flex;
  flex-direction: column;
  padding-left:   2rem;
}

/* Vertical accent line */
.timeline::before {
  content:    '';
  position:   absolute;
  left:       0;
  top:        0.7rem;
  bottom:     0.7rem;
  width:      1px;
  background: linear-gradient(to bottom, var(--acc), transparent);
  opacity:    0.4;
}

.timeline__entry {
  display:               grid;
  grid-template-columns: 9rem 1fr;
  gap:                   0 2.5rem;
  padding-block:         2rem;
  border-bottom:         1px solid var(--line);
  position:              relative;
}
.timeline__entry:last-child { border-bottom: none; }

/* Dot on the timeline line */
.timeline__entry::before {
  content:       '';
  position:      absolute;
  left:          -2rem;
  top:           2.5rem;
  width:         9px;
  height:        9px;
  border-radius: 50%;
  background:    var(--acc);
  border:        2px solid var(--bg);
  transform:     translateX(-4px);
  box-shadow:    0 0 0 3px var(--acc-soft);
}

.timeline__meta { padding-top: 0.2rem; }

.timeline__date {
  display:        block;
  font-family:    var(--font-mono);
  font-size:      0.68rem;
  font-weight:    700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color:          var(--muted2);
}

.timeline__role {
  font-family:    var(--font-display);
  font-size:      1.25rem;
  font-weight:    700;
  letter-spacing: -0.01em;
  color:          var(--text);
  margin-bottom:  0.25rem;
}

.timeline__company {
  font-size:    0.9rem;
  font-weight:  500;
  color:        var(--acc);
  margin-bottom: 1rem;
}

.timeline__bullets {
  display:        flex;
  flex-direction: column;
  gap:            0.5rem;
}

.timeline__bullets li {
  font-size:   0.9375rem;
  color:       var(--muted);
  line-height: 1.7;
  padding-left: 1.4em;
  position:    relative;
}

.timeline__bullets li::before {
  content:  '—';
  position: absolute;
  left:     0;
  color:    var(--muted2);
}


/* ─────────────────────────────────────────────────────
   CONTACT
   ───────────────────────────────────────────────────── */
.section--contact {
  background: radial-gradient(
    ellipse 80% 50% at 50% 0%,
    rgba(var(--acc-rgb),0.10) 0%,
    transparent 65%
  );
}

.contact__inner { text-align: center; }
.contact__inner .section__heading { margin-bottom: 1rem; }

.contact__sub {
  font-size:     1.0625rem;
  color:         var(--muted);
  max-width:     46ch;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  line-height:   1.7;
}

.contact__email {
  display:       inline-block;
  font-family:   var(--font-display);
  font-size:     clamp(1.2rem, 3vw, 1.875rem);
  font-weight:   700;
  letter-spacing: -0.02em;
  color:         var(--text);
  border-bottom: 2px solid var(--acc);
  padding-bottom: 0.1em;
  margin-bottom: 3rem;
  transition:    color var(--dur);
}
.contact__email:hover        { color: var(--acc); }
.contact__email:focus-visible { outline: 2px solid var(--acc); outline-offset: 6px; border-radius: 2px; }

.contact__socials {
  display:         flex;
  justify-content: center;
  gap:             1rem;
}

.social-link {
  width:         48px;
  height:        48px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  border:        1px solid var(--acc-soft);
  border-radius: 50%;
  color:         var(--acc);
  transition:    color var(--dur), border-color var(--dur),
                 background var(--dur), transform var(--dur);
}
.social-link svg { width: 20px; height: 20px; }
.social-link:hover {
  color:        var(--text);
  border-color: var(--acc);
  background:   var(--acc-soft);
  transform:    translateY(-2px);
}
.social-link:focus-visible { outline: 2px solid var(--acc); }


/* ─────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────── */
.site-footer {
  padding-block: 2rem;
  border-top:    1px solid var(--line);
}

.footer__inner {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             1rem;
  flex-wrap:       wrap;
}

.footer__copy,
.footer__made,
.footer__version {
  font-family: var(--font-mono);
  font-size:   0.78rem;
  color:       var(--muted2);
}
.footer__version { color: var(--muted); letter-spacing: 0.02em; }


/* ─────────────────────────────────────────────────────
   ENTRANCE ANIMATIONS
   ───────────────────────────────────────────────────── */
.animate-in {
  opacity:    0;
  transform:  translateY(20px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  transition-delay: var(--delay, 0ms);
}

.animate-in.in-view {
  opacity:   1;
  transform: translateY(0);
}

/* Honour the user's motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-in             { opacity: 1; transform: none; transition: none; }
  .hero__cta .btn--primary { animation: none; }
  *                        { transition-duration: 0.01ms !important;
                             animation-duration: 0.01ms !important; }
}


/* ─────────────────────────────────────────────────────
   FOCUS / A11Y
   ───────────────────────────────────────────────────── */
:focus-visible {
  outline:        2px solid var(--acc);
  outline-offset: 3px;
  border-radius:  3px;
}

/* Remove default focus ring when using mouse (progressive enhancement) */
:focus:not(:focus-visible) { outline: none; }


/* ─────────────────────────────────────────────────────
   SCROLLBAR  (WebKit / Blink)
   ───────────────────────────────────────────────────── */
::-webkit-scrollbar        { width: 8px; background: var(--bg); }
::-webkit-scrollbar-thumb  { background: var(--surface2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--line2); }


/* ─────────────────────────────────────────────────────
   RESPONSIVE — TABLET  (≤ 768px)
   ───────────────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Show hamburger, hide desktop nav inline */
  .hamburger { display: flex; }

  /* Nav menu becomes a full-height slide-in panel */
  .nav__menu {
    position:    fixed;
    inset:       var(--nav-h) 0 0 0;
    background:  var(--ink);
    padding:     2rem clamp(1.25rem, 4vw, 2.5rem);
    transform:   translateX(100%);
    transition:  transform 0.35s var(--ease);
    border-top:  1px solid var(--line);
    z-index:     150;
    overflow-y:  auto;
  }

  .nav__menu.open { transform: translateX(0); }

  /* Prevent body scroll when menu is open */
  body.nav-open { overflow: hidden; }

  /* Vertical link list */
  .nav__links {
    flex-direction: column;
    align-items:    flex-start;
    gap:            0;
    width:          100%;
  }

  .nav__links a {
    display:       block;
    width:         100%;
    padding:       1rem 0.5rem;
    font-size:     1.1rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav__links li:last-child a { border-bottom: none; }

  /* About: stack photo above text */
  .about__grid {
    grid-template-columns: 1fr;
    gap:                   2rem;
  }
  .about__photo-wrap {
    order:  -1;
    width:  160px;
  }
  .about__photo { aspect-ratio: 1 / 1; }

  /* Timeline collapses to single column */
  .timeline__entry {
    grid-template-columns: 1fr;
    gap:                   0.5rem;
  }
  .timeline__entry::before { top: 2rem; }
}


/* ─────────────────────────────────────────────────────
   RESPONSIVE — MOBILE  (≤ 480px)
   ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero__cta              { flex-direction: column; }
  .hero__cta .btn         { width: 100%; justify-content: center; }
  .projects__grid         { grid-template-columns: 1fr; }
  .skills__grid           { grid-template-columns: 1fr; }
  .footer__inner          { flex-direction: column; text-align: center; }
  .project-card__footer   { flex-direction: column; align-items: flex-start; }
}
