/* ============================================================
   Dhrubo — Portfolio v2
   Light earthy palette inspired by reference design
   Cream + white + burnt clay accent
   Film grain, clean portrait, highlighter on name
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Light earthy palette */
  --cream: #f5f1e8;
  --paper: #faf6ed;
  --paper-2: #ede5d2;
  --sage: #6b7f5f;
  --sage-deep: #566b4b;
  --sage-light: #8a9b7c;
  --sage-text: #f5f1e8;
  --sage-muted: #c5cdb9;

  --ink: #1a1a1a;
  --ink-soft: #3a3a3a;
  --ink-muted: #6b665c;
  --ink-dim: #9a948a;

  --accent: #c08552;             /* burnt clay — highlighter */
  --accent-deep: #a06b3d;
  --accent-soft: rgba(192, 133, 82, 0.32);
  --accent-glow: rgba(192, 133, 82, 0.15);

  --border: #d8d0bd;
  --border-soft: #e3dcc9;
  --border-sage: rgba(245, 241, 232, 0.20);

  /* type */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --font-hand: "Caveat", "Fraunces", cursive;

  /* sizing */
  --container: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(4rem, 9vw, 8rem);

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --shadow-card: 0 1px 0 rgba(26, 26, 26, 0.04), 0 8px 24px -8px rgba(26, 26, 26, 0.08);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 1rem;
  z-index: 1000;
  font-weight: 500;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Film grain overlay (subtle, site-wide) ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
  border-top: 1px solid var(--border-soft);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section__index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.12em;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section__sub {
  color: var(--ink-muted);
  max-width: 60ch;
  font-size: 1.05rem;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(245, 241, 232, 0.78);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav.is-scrolled { border-bottom-color: var(--border); }

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.nav__logo-dot { color: var(--accent); }

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.nav__link {
  font-size: 0.92rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
  position: relative;
  padding: 0.4rem 0;
}

.nav__link:hover { color: var(--ink); }

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}

.nav__link:hover::after { width: 100%; }

.nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after { width: 100%; }

.nav__link--cta {
  border: 1px solid var(--ink);
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  color: var(--ink);
  background: transparent;
}
.nav__link--cta::after { display: none; }
.nav__link--cta:hover {
  background: var(--ink);
  color: var(--cream);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.4rem;
}
.nav__toggle-bar {
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

/* ============================================================
   HERO — split 50/50, cream left + sage right
   ============================================================ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 4rem;
}

.hero__left {
  background: var(--cream);
  padding: clamp(2rem, 5vw, 4rem) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.hero__right {
  background: linear-gradient(to right, #ffffff 0%, #ffffff 50%, #0a0a0a 50%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem) var(--gutter);
  position: relative;
  overflow: hidden;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
  text-transform: lowercase;
}
.hero__eyebrow-mark {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 1.5rem + 3.5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.4rem;
}

.hero__title em {
  font-style: italic;
  font-weight: 700;
  background: linear-gradient(180deg, transparent 60%, var(--accent-soft) 60%, var(--accent-soft) 95%, transparent 95%);
  padding: 0 0.15em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero__lead {
  color: var(--ink-soft);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  max-width: 48ch;
  margin-bottom: 1.8rem;
  line-height: 1.7;
}

.hero__stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero__stack-item {
  display: inline-flex;
  align-items: center;
}

.hero__stack-item[aria-hidden="true"] {
  color: var(--ink-dim);
  opacity: 0.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--r-sm);
  transition: all 0.2s var(--ease);
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--ink);
  color: var(--cream);
}
.btn--primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}
.btn--ghost {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn--ghost:hover {
  background: var(--ink);
  color: var(--cream);
}

.hero__location {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero__location-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(107, 127, 95, 0.18);
}

/* ---- Portrait (clean, no frame, B&W) ---- */
.hero__portrait {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f5f1e8;
}

.hero__portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 38% center;
  filter: grayscale(1);
}

/* socials on dark half of panel (small, top-right) */
.hero__socials {
  position: absolute;
  top: clamp(5rem, 8vh, 7rem);
  right: var(--gutter);
  display: flex;
  gap: 0.8rem;
  z-index: 2;
}

.hero__social {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5f1e8;
  border: 1px solid rgba(245, 241, 232, 0.25);
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s var(--ease);
}
.hero__social:hover {
  background: #f5f1e8;
  color: #0a0a0a;
  border-color: #f5f1e8;
}
.hero__social svg { width: 16px; height: 16px; }

/* scroll cue */
.hero__scroll {
  position: absolute;
  bottom: 1.4rem;
  left: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.5;
}
.hero__scroll-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, transparent, var(--ink-muted));
}
.hero__scroll-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

/* ============================================================
   ABOUT
   ============================================================ */
.section--about { background: var(--cream); }

.about__grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about__lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 1rem + 1.4vw, 1.9rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.about__intro p { margin-bottom: 1.1rem; color: var(--ink-soft); }
.about__intro strong { color: var(--ink); font-weight: 600; }

.about__card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.8rem;
  box-shadow: var(--shadow-card);
}

.about__card-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.2rem;
  font-weight: 500;
}

.about__notes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.about__notes li {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border-soft);
}
.about__notes li:last-child { border-bottom: none; padding-bottom: 0; }
.about__notes-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.about__notes-text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.section--projects { background: var(--paper); }

.grid {
  display: grid;
  gap: 1.2rem;
}
.grid--projects {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}
.grid--interests {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  box-shadow: var(--shadow-card);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(26, 26, 26, 0.06), 0 16px 32px -8px rgba(26, 26, 26, 0.14);
  border-color: var(--accent);
}

.card__media {
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
  overflow: hidden;
}
.card__media svg { width: 100%; height: 100%; }

.card__body {
  padding: 1.4rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card__tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--sage-deep);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.card__desc {
  font-size: 0.9rem;
  color: var(--ink-muted);
  flex: 1;
}

.card__link {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 0.4rem;
}
.card__link:hover { color: var(--accent-deep); }

/* ============================================================
   APPS & TOOLS
   ============================================================ */
.section--apps { background: var(--cream); }

.apps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.apps-list__item {
  display: grid;
  grid-template-columns: 100px 1fr 40px;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s var(--ease), padding 0.2s var(--ease);
}
.apps-list__item:hover {
  background: var(--accent-glow);
  padding-left: 1rem;
  padding-right: 1rem;
}

.apps-list__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.apps-list__num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-dim);
}
.apps-list__kind {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.apps-list__main { display: flex; flex-direction: column; gap: 0.3rem; }
.apps-list__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.apps-list__desc {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.apps-list__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1rem;
  color: var(--ink-muted);
  transition: all 0.2s var(--ease);
  justify-self: end;
  background: #fff;
}
.apps-list__item:hover .apps-list__link {
  border-color: var(--accent);
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ============================================================
   PHOTOGRAPHY
   ============================================================ */
.section--photo { background: var(--paper); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 0.9rem;
}

.photo-grid__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--paper-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.photo-grid__item:hover,
.photo-grid__item:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 4px 8px rgba(26, 26, 26, 0.06), 0 16px 32px -8px rgba(26, 26, 26, 0.18);
  outline: none;
}
.photo-grid__item--tall { grid-row: span 2; }
.photo-grid__item--wide { grid-column: span 2; }

.photo-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease), filter 0.3s var(--ease);
}
.photo-grid__item:hover img {
  transform: scale(1.04);
}

.photo-grid__cap {
  position: absolute;
  bottom: 0.6rem;
  left: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--cream);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  background: rgba(26, 26, 26, 0.65);
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(13, 12, 10, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  animation: lightbox-fade-in 0.25s var(--ease);
}

.lightbox[hidden] { display: none; }

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

.lightbox__figure {
  position: relative;
  max-width: min(100%, 1100px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin: 0;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.6);
  animation: lightbox-zoom-in 0.3s var(--ease);
}

@keyframes lightbox-zoom-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox__cap {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cream);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 241, 232, 0.08);
  border: 1px solid rgba(245, 241, 232, 0.18);
  border-radius: 50%;
  color: var(--cream);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 2;
}
.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(192, 133, 82, 0.3);
  border-color: var(--accent);
}
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.lightbox__close svg,
.lightbox__nav svg { width: 22px; height: 22px; }

.lightbox__close {
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  transform: none;
}

.lightbox__nav--prev { left: clamp(1rem, 3vw, 2rem); }
.lightbox__nav--next { right: clamp(1rem, 3vw, 2rem); }

.lightbox__nav--prev:hover { transform: translateY(-50%) translateX(-2px); }
.lightbox__nav--next:hover { transform: translateY(-50%) translateX(2px); }

/* Hide prev/next on small screens — users can swipe or use keyboard */
@media (max-width: 600px) {
  .lightbox__nav { display: none; }
  .lightbox__close { width: 40px; height: 40px; }
  .lightbox__close svg,
  .lightbox__nav svg { width: 18px; height: 18px; }
}

/* ============================================================
   INTERESTS
   ============================================================ */
.section--interests { background: var(--cream); }

.interests-narrative {
  display: flex;
  flex-direction: column;
  gap: clamp(1.4rem, 2.5vw, 2rem);
  max-width: 62ch;
}

.interest-note {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.55;
  letter-spacing: -0.005em;
}

.interest-note__title {
  font-weight: 600;
  color: var(--ink);
}

.interest-note__text {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
}

/* ============================================================
   CONTACT
   ============================================================ */
.section--contact {
  background: var(--sage);
  color: var(--sage-text);
}
.section--contact .section__title { color: var(--sage-text); }
.section--contact .section__index { color: var(--accent); }
.section--contact .section__sub { color: var(--sage-muted); }

.contact {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.contact__lead {
  font-size: 1.1rem;
  color: var(--sage-muted);
  max-width: 45ch;
  margin-block: 1.2rem 1.5rem;
}

.contact__email {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1rem + 2vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.contact__email a {
  color: var(--sage-text);
  border-bottom: 1px solid var(--border-sage);
  padding-bottom: 0.15rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.contact__email a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.socials {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.social {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-sage);
  border-radius: var(--r-md);
  background: rgba(245, 241, 232, 0.04);
  color: var(--sage-text);
  transition: all 0.2s var(--ease);
}
.social:hover {
  border-color: var(--accent);
  background: rgba(192, 133, 82, 0.18);
  color: var(--sage-text);
}

.social svg { width: 18px; height: 18px; flex-shrink: 0; }
.social__label {
  font-size: 0.92rem;
  font-weight: 500;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border-soft);
  padding-block: 2.5rem;
  background: var(--cream);
}

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

.footer__mark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--ink);
}
.footer__dot { color: var(--accent); }

.footer__tag {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 0.3rem;
}

.footer__meta {
  text-align: right;
  font-size: 0.8rem;
  color: var(--ink-dim);
  font-family: var(--font-mono);
}
.footer__meta p + p { margin-top: 0.2rem; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero__left { min-height: 70vh; padding-top: 6rem; }
  .hero__right { padding-block: clamp(3rem, 8vw, 5rem); }
  .hero__socials { top: auto; bottom: 1.4rem; right: 1.4rem; }
  .hero__scroll { display: none; }

  .about__grid { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(80vw, 320px);
    background: var(--cream);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 2.5rem;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    z-index: 99;
  }
  .nav__menu.is-open { transform: translateX(0); }
  .nav__link { font-size: 1.1rem; font-family: var(--font-display); color: var(--ink); }
  .nav__link--cta { padding: 0.5rem 1.2rem; }

  .nav__toggle { display: flex; z-index: 101; }
  .nav__toggle.is-open .nav__toggle-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .nav__toggle.is-open .nav__toggle-bar:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open .nav__toggle-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}

@media (max-width: 600px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .photo-grid__item--wide { grid-column: span 2; }
  .photo-grid__item--tall { grid-row: span 2; }

  .apps-list__item {
    grid-template-columns: 60px 1fr 36px;
    gap: 1rem;
    padding: 1.2rem 0.3rem;
  }
  .apps-list__title { font-size: 1.1rem; }

  .socials { grid-template-columns: 1fr; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__meta { text-align: left; }

  .hero__title { font-size: clamp(2rem, 1.5rem + 4vw, 3rem); }
  .hero__portrait { max-width: 320px; }
}

@media (max-width: 400px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .hero__stack { font-size: 0.85rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print ---------- */
@media print {
  .nav, .hero__scroll, .nav__toggle, .grain { display: none; }
  body { background: white; color: black; }
  .hero { grid-template-columns: 1fr; }
  .hero__right { background: white; color: black; }
  .hero__right .hero__social { color: #1a1a1a; border-color: #d8d0bd; }
}
