/* =====================================================================
   Fadaukas Daffa Tajuddin — portfolio
   Palette and motifs (rings, dot grids, solid circles) follow the
   warm cream/brown look of the PDF portfolio.
   ===================================================================== */

/* ------------------------------------------------------------ fonts */
@font-face {
  font-family: "Archivo Expanded";
  src: url("../fonts/archivo-expanded.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Display";
  src: url("../fonts/redhat-display.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Red Hat Mono";
  src: url("../fonts/redhat-mono.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------ tokens */
:root {
  --bg: #f4ede3;
  --bg-alt: #ebe1d3;
  --surface: #fbf7f1;
  --surface-2: #e4d7c6;
  --ink: #2e1d10;
  --text: #3f2c1e;
  --muted: #6f5a49;
  --accent: #8a5a36;
  --accent-hover: #6f4628;
  --accent-deep: #634228;
  --accent-text: #74492a;
  --accent-soft: rgba(138, 90, 54, 0.12);
  --on-accent: #fbf5ec;
  --line: rgba(62, 40, 22, 0.13);
  --line-strong: rgba(62, 40, 22, 0.26);
  --dot: rgba(138, 90, 54, 0.55);
  --contact-bg: #3a2616;
  --contact-ink: #f6ede1;
  --contact-muted: #d3bfa8;
  --contact-line: rgba(246, 237, 225, 0.18);
  --shadow: 0 1px 2px rgba(46, 29, 16, 0.06), 0 10px 28px -6px rgba(46, 29, 16, 0.14);
  --shadow-lg: 0 2px 4px rgba(46, 29, 16, 0.06), 0 28px 56px -12px rgba(46, 29, 16, 0.28);
  --photo-shadow: 0 40px 80px -30px rgba(46, 29, 16, 0.6);

  --font-display: "Archivo Expanded", "Arial Black", "Segoe UI Black", system-ui, sans-serif;
  --font-body: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Red Hat Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 18px;
  --radius-lg: 24px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17110c;
    --bg-alt: #1e1610;
    --surface: #241a12;
    --surface-2: #2f2319;
    --ink: #f5ebdf;
    --text: #e2d3c1;
    --muted: #ab967f;
    --accent: #d59e6e;
    --accent-hover: #e6b68b;
    --accent-deep: #6e4a2d;
    --accent-text: #e2b48a;
    --accent-soft: rgba(213, 158, 110, 0.14);
    --on-accent: #1a120b;
    --line: rgba(245, 235, 223, 0.1);
    --line-strong: rgba(245, 235, 223, 0.22);
    --dot: rgba(213, 158, 110, 0.42);
    --contact-bg: #2a1d13;
    --contact-ink: #f5ebdf;
    --contact-muted: #cdb8a0;
    --contact-line: rgba(245, 235, 223, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 28px 56px -12px rgba(0, 0, 0, 0.6);
    --photo-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17110c;
  --bg-alt: #1e1610;
  --surface: #241a12;
  --surface-2: #2f2319;
  --ink: #f5ebdf;
  --text: #e2d3c1;
  --muted: #ab967f;
  --accent: #d59e6e;
  --accent-hover: #e6b68b;
  --accent-deep: #6e4a2d;
  --accent-text: #e2b48a;
  --accent-soft: rgba(213, 158, 110, 0.14);
  --on-accent: #1a120b;
  --line: rgba(245, 235, 223, 0.1);
  --line-strong: rgba(245, 235, 223, 0.22);
  --dot: rgba(213, 158, 110, 0.42);
  --contact-bg: #2a1d13;
  --contact-ink: #f5ebdf;
  --contact-muted: #cdb8a0;
  --contact-line: rgba(245, 235, 223, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 28px -6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 28px 56px -12px rgba(0, 0, 0, 0.6);
  --photo-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* ------------------------------------------------------------ language switching
   Every translatable text has an English and an Indonesian twin:
   <span lang="en">…</span><span lang="id">…</span>. Only the active one shows. */
html:not([data-lang="id"]) body [lang="id"],
html[data-lang="id"] body [lang="en"] {
  display: none !important;
}

/* ------------------------------------------------------------ base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html:has(dialog[open]) {
  overflow: hidden;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color 0.3s ease, color 0.3s ease;
}
img,
svg {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  color: var(--ink);
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
abbr[title] {
  text-decoration: none;
}
strong {
  color: var(--ink);
  font-weight: 700;
}
::selection {
  background: var(--accent);
  color: var(--on-accent);
}
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------------------ header + nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px -18px rgba(46, 29, 16, 0.35);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--header-h);
}
.logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.logo span {
  color: var(--accent);
}
.nav-menu {
  margin-left: auto;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  position: relative;
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-links a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}
.nav-links a.is-active {
  color: var(--accent-text);
}
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.1rem;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: currentColor;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.lang-switch button {
  padding: 0.28rem 0.62rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lang-switch button:hover {
  color: var(--ink);
}
.lang-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.icon-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.icon-btn .icon {
  grid-area: 1 / 1;
  width: 19px;
  height: 19px;
}
/* show the icon of the theme you would switch to */
.theme-toggle .icon-sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}
.nav-toggle {
  display: none;
}
.nav-toggle .icon-close,
.site-header.nav-open .nav-toggle .icon-open {
  display: none;
}
.site-header.nav-open .nav-toggle .icon-close {
  display: block;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: grid;
  }
  .nav-actions {
    margin-left: auto;
  }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(46, 29, 16, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s var(--ease), visibility 0s linear 0.25s;
  }
  .site-header.nav-open .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease), visibility 0s;
  }
  .nav-links {
    flex-direction: column;
    gap: 0;
  }
  .nav-links li + li {
    border-top: 1px solid var(--line);
  }
  .nav-links a {
    padding: 0.85rem 0.25rem;
    border-radius: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--ink);
  }
  .nav-links a:hover {
    background: none;
    color: var(--accent-text);
  }
  .nav-links a.is-active::after {
    left: auto;
    right: 0.25rem;
    top: 50%;
    bottom: auto;
    margin: -2.5px 0 0;
  }
}

/* ------------------------------------------------------------ buttons + links */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.8em 1.35em;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn-lg {
  padding: 0.95em 1.6em;
  font-size: 1.05rem;
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 24px -12px var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-primary .icon {
  transition: transform 0.2s var(--ease);
}
.btn-primary:hover .icon {
  transform: translateX(3px);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding-bottom: 2px;
  border-bottom: 1.5px solid var(--line-strong);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.97rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.link-arrow:hover {
  color: var(--accent-text);
  border-color: var(--accent);
}
.link-arrow .icon {
  width: 1.05em;
  height: 1.05em;
}

/* ------------------------------------------------------------ hero */
.hero-wrap {
  position: relative;
  overflow: clip;
  isolation: isolate;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(40px, 7vw, 96px) clamp(56px, 7vw, 104px);
}
.hero-text {
  container-type: inline-size;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.eyebrow::before {
  content: "";
  width: 36px;
  height: 1.5px;
  background: currentColor;
}
.hero-name {
  margin: 0.3em 0 0.4em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  font-size: clamp(2.4rem, 14.6cqi, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.hero-name > span {
  display: block;
}
.hero-name .accent {
  color: var(--accent);
}
.hero-lead {
  max-width: 34em;
  margin: 0 0 2rem;
  font-size: clamp(1.06rem, 1rem + 0.35vw, 1.24rem);
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin: 2.25rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.hero-facts li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-facts .icon {
  color: var(--accent);
}

.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 500px);
  aspect-ratio: 1;
}
.deco {
  position: absolute;
  pointer-events: none;
}
.deco-halo {
  inset: -20%;
  z-index: -1;
  border-radius: 50%;
  background: var(--bg-alt);
}
.deco-dots {
  left: -10%;
  top: -6%;
  width: 48%;
  height: 48%;
  background: radial-gradient(circle, var(--dot) 1.6px, transparent 2.1px) 0 0 / 15px 15px;
  -webkit-mask: radial-gradient(closest-side, #000 50%, transparent);
  mask: radial-gradient(closest-side, #000 50%, transparent);
}
.deco-blob {
  right: -9%;
  top: -9%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent-deep);
}
.deco-rings {
  left: -14%;
  bottom: -12%;
  width: 46%;
  height: auto;
  aspect-ratio: 1;
  fill: none;
  stroke: var(--accent);
  stroke-width: 3px;
}
.hero-photo {
  position: absolute;
  inset: 9%;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: 0 0 0 10px var(--bg), var(--photo-shadow);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.deco-dot {
  left: 3%;
  bottom: 5%;
  z-index: 2;
  width: 17%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
}
.hero-sticker {
  position: absolute;
  right: -2%;
  bottom: 12%;
  z-index: 3;
  margin: 0;
  padding: 0.55em 1.05em;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow);
  transform: rotate(-6deg);
}

@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow,
  .hero-name > span,
  .hero-lead,
  .hero-cta,
  .hero-facts {
    animation: rise 0.8s var(--ease) both;
  }
  .hero .eyebrow { animation-delay: 0.05s; }
  .hero-name > span:nth-child(1) { animation-delay: 0.12s; }
  .hero-name > span:nth-child(2) { animation-delay: 0.2s; }
  .hero-name > span:nth-child(3) { animation-delay: 0.28s; }
  .hero-lead { animation-delay: 0.38s; }
  .hero-cta { animation-delay: 0.46s; }
  .hero-facts { animation-delay: 0.54s; }
  .hero-photo { animation: pop 1s var(--ease) 0.15s both; }
  .deco-blob { animation: pop 1.1s var(--ease) 0.3s both; }
  .deco-dot { animation: pop 0.9s var(--ease) 0.55s both; }
  .hero-sticker { animation: sticker 0.7s var(--ease) 0.9s both; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.9); }
}
@keyframes sticker {
  from { opacity: 0; transform: rotate(-16deg) scale(0.7); }
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 28px;
  }
  .hero-visual {
    order: -1;
    width: min(72vw, 330px);
    margin-bottom: 0.5rem;
  }
  .hero-sticker {
    font-size: 0.78rem;
    right: -6%;
  }
}

/* ------------------------------------------------------------ ticker */
.ticker {
  display: flex;
  overflow: hidden;
  padding-block: 1.1rem;
  border-block: 1px solid var(--line);
  -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker ul {
  display: flex;
  flex: none;
  gap: 2.25rem;
  margin: 0;
  padding: 0 2.25rem 0 0;
  list-style: none;
}
.ticker li {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
}
.ticker li::after {
  content: "✦";
  color: var(--accent);
  font-size: 0.75em;
}
@media (prefers-reduced-motion: no-preference) {
  .ticker ul {
    animation: marquee 48s linear infinite;
  }
  .ticker:hover ul {
    animation-play-state: paused;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ticker {
    display: block;
    -webkit-mask: none;
    mask: none;
  }
  .ticker ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.25rem;
    padding: 0 var(--gutter);
  }
  .ticker li {
    gap: 1.25rem;
    font-size: 0.98rem;
  }
  .ticker ul[aria-hidden] {
    display: none;
  }
}
@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* ------------------------------------------------------------ sections */
.section {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: clamp(72px, 10vw, 128px);
}
.section-alt {
  background: var(--bg-alt);
}
.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.9rem;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: currentColor;
}
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 1.1rem + 3.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.section-lead {
  margin: 1.1rem 0 0;
  max-width: 40em;
  color: var(--muted);
  font-size: 1.1rem;
}
.sub-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: clamp(48px, 6vw, 72px) 0 1.5rem;
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 800;
}
.sub-head .icon {
  color: var(--accent);
}
.mini-title {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.1rem;
  font-size: 1.12rem;
  font-weight: 800;
}
.card-title .icon {
  color: var(--accent);
}
.when {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.chips,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 0.45em 0.95em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 600;
}
.tags li {
  padding: 0.28em 0.7em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
}
.section-deco {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.deco-dots-corner {
  top: 48px;
  right: -40px;
  width: 300px;
  height: 220px;
  background: radial-gradient(circle, var(--dot) 1.6px, transparent 2.1px) 0 0 / 16px 16px;
  -webkit-mask: radial-gradient(closest-side, #000 45%, transparent);
  mask: radial-gradient(closest-side, #000 45%, transparent);
}
@media (max-width: 760px) {
  .deco-dots-corner {
    display: none;
  }
}
.deco-quarter {
  /* sits in the bottom-left corner, below the "Also worked with" chips */
  display: none;
  left: -140px;
  bottom: -190px;
  width: 280px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent-deep);
  opacity: 0.9;
}
@media (min-width: 1100px) {
  .deco-quarter {
    display: block;
  }
}

/* ------------------------------------------------------------ about */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(36px, 6vw, 88px);
}
.about-photo {
  /* Any photo is shown in this shape (cropped from the centre), and the frame
     follows it, so swapping the photo never misaligns the frame. */
  --photo-ratio: 4 / 5;
  position: relative;
  margin: 0;
  isolation: isolate;
}
.about-photo::before {
  /* offset frame around the photo only (not the caption) */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  aspect-ratio: var(--photo-ratio);
  z-index: -1;
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  transform: translate(16px, 16px);
}
.about-photo img {
  width: 100%;
  aspect-ratio: var(--photo-ratio);
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--surface-2);
}
.about-photo figcaption {
  margin-top: 1.6rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.prose p {
  margin: 0 0 1.1em;
  font-size: 1.1rem;
}
.interests {
  margin: 1.8rem 0 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 2.2rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}
.stats > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 1.15rem 1.1rem;
  background: var(--surface);
}
.stats dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem);
  font-weight: 900;
  line-height: 1;
}
.stats dt {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
}
.about-cards {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1rem;
}
.edu-list {
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.edu-list li {
  position: relative;
  padding-left: 1.1rem;
  border-left: 2px solid var(--line-strong);
}
.edu-list li:first-child {
  border-left-color: var(--accent);
}
.edu-list h4 {
  margin: 0.15rem 0 0.1rem;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.35;
}
.edu-list p:not(.when) {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
}
.edu-list p.gpa {
  margin-top: 0.15rem;
  color: var(--accent-text);
  font-weight: 700;
}
.lang-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lang-list li {
  display: flex;
  flex-direction: column;
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed var(--line-strong);
  color: var(--ink);
  font-weight: 700;
}
.lang-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.lang-list em {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 500;
}

@media (max-width: 880px) {
  .about-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .about-photo {
    width: min(78%, 340px);
  }
}
@media (max-width: 640px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------ experience */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}
.tl-item {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 1rem 2.5rem;
  padding-block: 2.2rem;
  border-bottom: 1px solid var(--line-strong);
}
.tl-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
}
.tl-date {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.badge-now {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.3em 0.75em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-now::before {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .badge-now::before {
    animation: pulse 2s ease-out infinite;
  }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent); }
  70%, 100% { box-shadow: 0 0 0 0.6em transparent; }
}
.tl-body h3 {
  margin: 0;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  font-weight: 800;
  line-height: 1.25;
}
.tl-org {
  margin: 0.2rem 0 1rem;
  color: var(--accent-text);
  font-weight: 700;
}
.tl-points {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  list-style: disc;
}
.tl-points li::marker {
  color: var(--accent);
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mini-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, border-color 0.25s ease;
}
.mini-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.mini-card h4 {
  margin: 0.2rem 0 0;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.3;
}
.mini-card .org {
  margin: 0 0 0.35rem;
  color: var(--accent-text);
  font-size: 0.92rem;
  font-weight: 700;
}
.mini-card p:last-child {
  margin: 0;
  font-size: 0.96rem;
}
@media (max-width: 720px) {
  .tl-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
    padding-block: 1.8rem;
  }
  .tl-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .tl-date {
    margin: 0;
  }
}

/* ------------------------------------------------------------ projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
}
.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lg);
}
.project-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  cursor: zoom-in;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease);
}
.project-card:hover .project-media img {
  transform: scale(1.04);
}
.project-media:focus-visible {
  outline-offset: -4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.media-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.35em 0.75em;
  border-radius: 999px;
  background: rgba(23, 14, 8, 0.72);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 1.6rem 1.7rem;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.project-meta .role {
  padding: 0.2em 0.7em;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}
.project-body h3 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.project-sub {
  margin: -0.35rem 0 0;
  color: var(--accent-text);
  font-weight: 700;
}
.project-desc {
  margin: 0 0 0.25rem;
}
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin-top: auto;
  padding-top: 0.75rem;
}
.more-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin: clamp(48px, 6vw, 72px) 0 1.5rem;
}
.more-head .sub-head {
  margin: 0;
}
.more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.more-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, border-color 0.25s ease;
}
.more-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.more-card:focus-within {
  border-color: var(--accent);
}
.more-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.more-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
}
.more-icon .icon {
  width: 22px;
  height: 22px;
}
.pill {
  padding: 0.25em 0.7em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: right;
}
.more-card h4 {
  margin: 0.2rem 0 0;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.3;
}
.more-card h4 a {
  text-decoration: none;
}
.more-card h4 a::after {
  /* make the whole card clickable */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.more-card h4 a:focus-visible {
  outline: none;
}
.more-card h4 a:focus-visible::after {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
}
.more-card p {
  margin: 0;
  font-size: 0.96rem;
}
.more-card .tags {
  margin-top: auto;
  padding-top: 0.35rem;
}
@media (max-width: 820px) {
  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------ skills */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: -0.75rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
/* 3-segment level meter, drawn without extra markup */
.meter,
.skill-list li::after {
  --fill: 0px;
  display: inline-block;
  flex: none;
  width: 66px;
  height: 7px;
  background: linear-gradient(90deg, var(--accent) 0 var(--fill), var(--line-strong) var(--fill) 100%);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 18px, transparent 18px 24px);
  mask: repeating-linear-gradient(90deg, #000 0 18px, transparent 18px 24px);
}
[data-level="1"].meter,
.skill-list li[data-level="1"]::after {
  --fill: 18px;
}
[data-level="2"].meter,
.skill-list li[data-level="2"]::after {
  --fill: 42px;
}
[data-level="3"].meter,
.skill-list li[data-level="3"]::after {
  --fill: 66px;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.skill-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.skill-list li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.62rem 0;
  border-bottom: 1px dashed var(--line-strong);
  color: var(--ink);
  font-weight: 600;
}
.skill-list li:last-child {
  border-bottom: 0;
}
.skill-list li::after {
  content: "";
}
.also {
  margin-top: 2rem;
}
@media (max-width: 960px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .skills-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------------------ contact + footer */
.contact {
  background: var(--contact-bg);
  color: var(--contact-muted);
}
.contact .kicker {
  color: var(--contact-muted);
}
.contact-inner {
  position: relative;
}
.contact-title {
  max-width: 14ch;
  margin: 0;
  color: var(--contact-ink);
  font-size: clamp(2.4rem, 1rem + 6vw, 5.4rem);
  line-height: 1;
}
.contact-lead {
  max-width: 34em;
  margin: 1.5rem 0 2.25rem;
  color: var(--contact-muted);
  font-size: clamp(1.06rem, 1rem + 0.35vw, 1.22rem);
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn-light {
  background: var(--contact-ink);
  color: var(--contact-bg);
  overflow-wrap: anywhere;
}
.btn-light:hover {
  background: #fff;
}
.btn-outline-light {
  border-color: var(--contact-line);
  background: transparent;
  color: var(--contact-ink);
}
.btn-outline-light:hover {
  border-color: var(--contact-ink);
}
.contact :focus-visible {
  outline-color: var(--contact-ink);
}
.socials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}
.socials a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--contact-line);
  border-radius: var(--radius);
  color: var(--contact-ink);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.25s var(--ease);
}
.socials a:hover {
  transform: translateY(-3px);
  border-color: var(--contact-muted);
  background: rgba(255, 255, 255, 0.05);
}
.socials .icon {
  width: 24px;
  height: 24px;
}
.social-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
.social-text strong {
  color: var(--contact-ink);
}
.social-text span {
  overflow: hidden;
  color: var(--contact-muted);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.socials .arrow {
  width: 18px;
  height: 18px;
  margin-left: auto;
  opacity: 0.6;
}
.contact-rings {
  top: -90px;
  right: -90px;
  width: 360px;
  height: 360px;
  fill: none;
  stroke: var(--contact-line);
  stroke-width: 3px;
}
.contact-circle {
  right: 12%;
  bottom: -70px;
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.35;
}
.site-footer {
  padding-block: 1.6rem;
  border-top: 1px solid var(--contact-line);
  background: var(--contact-bg);
  color: var(--contact-muted);
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.footer-inner p {
  margin: 0;
}
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  color: var(--contact-ink);
  font-weight: 700;
  text-decoration: none;
}
.to-top:hover .icon {
  transform: translateY(-2px);
}
.to-top .icon {
  transition: transform 0.2s var(--ease);
}
.site-footer :focus-visible {
  outline-color: var(--contact-ink);
}
@media (max-width: 760px) {
  .socials {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-rings {
    width: 240px;
    height: 240px;
    top: -60px;
    right: -80px;
  }
}

/* ------------------------------------------------------------ lightbox */
.lightbox {
  width: min(1100px, 100vw - 2rem);
  max-width: none;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: #f5ebdf;
}
.lightbox::backdrop {
  background: rgba(16, 10, 6, 0.88);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox[open] {
  animation: lb-in 0.25s var(--ease);
}
@keyframes lb-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
}
.lb-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.lb-title {
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}
.lb-count {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.lb-close {
  margin-left: auto;
}
.lb-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(20, 12, 7, 0.55);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.lb-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.16);
}
.lb-btn[hidden] {
  display: none;
}
.lb-btn .icon {
  width: 20px;
  height: 20px;
}
.lightbox :focus-visible {
  outline-color: #fff;
}
.lb-stage {
  position: relative;
  display: grid;
  place-items: center;
}
.lb-img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 11rem);
  max-height: calc(100dvh - 11rem);
  border-radius: 12px;
  background: #111;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  touch-action: pan-y pinch-zoom;
}
.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.lb-prev {
  left: -64px;
}
.lb-next {
  right: -64px;
}
.lb-cap {
  max-width: 60ch;
  margin: 1rem auto 0;
  color: #e9ddce;
  font-size: 0.95rem;
  text-align: center;
}
@media (max-width: 1260px) {
  .lb-prev {
    left: 10px;
  }
  .lb-next {
    right: 10px;
  }
}

/* ------------------------------------------------------------ toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 300;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------ scroll reveal (JS only) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.8s var(--ease);
    transition-delay: calc(var(--d, 0) * 70ms);
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------ print */
@media print {
  .site-header,
  .ticker,
  .hero-sticker,
  .deco,
  .section-deco,
  .contact-actions .copy-btn,
  .to-top {
    display: none !important;
  }
  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .contact,
  .site-footer {
    background: none;
    color: #000;
  }
}
