/* Fonts: Geist (SIL Open Font License), self-hosted in /fonts */
@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-a.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-b.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* Adam Howari — styles. Tokens first; everything else uses them. */
:root {
  --navy: #0B1220;
  --slate: #172338;
  --slate-2: #1E2D47;
  --blue: #3B82F6;
  --blue-600: #2563EB;
  --cyan: #38BDF8;
  --white: #FFFFFF;
  --gray: #94A3B8;
  --gray-300: #CBD5E1;
  --soft: #F8FAFC;
  --ink: #0B1220;
  --ink-2: #334155;
  --ink-3: #475569;
  --line-dark: rgba(148, 163, 184, .16);
  --line-light: #E2E8F0;

  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* type scale (fluid) */
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.125rem, 1rem + .4vw, 1.25rem);
  --fs-h3: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  --fs-h2: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  --fs-h1: clamp(2.75rem, 1.6rem + 5vw, 5.5rem);

  --radius: 18px;
  --radius-sm: 10px;
  --space-section: clamp(5rem, 3rem + 7vw, 9rem);
  --container: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: 1.65; color: var(--white); background: var(--navy); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.02em; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }
.icon { width: 1.1em; height: 1.1em; flex: none; }
.icon-lg { width: 28px; height: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--gray); }
.theme-light .muted { color: var(--ink-3); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.theme-light :focus-visible { outline-color: var(--blue-600); }

.skip { position: fixed; left: 1rem; top: -100px; z-index: 100; background: var(--white); color: var(--ink); padding: .6rem 1rem; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 1rem; }

.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; position: relative; }
.container.narrow { width: min(100% - 2.5rem, 820px); }

/* ── themes ───────────────────────────── */
.theme-dark { background: var(--navy); color: var(--white); }
.theme-slate { background: var(--slate); color: var(--white); }
.theme-light { background: var(--soft); color: var(--ink); }
.section { padding-block: var(--space-section); position: relative; overflow: hidden; isolation: isolate; }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.eyebrow { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 1rem; display: inline-flex; align-items: center; gap: .6rem; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.theme-light .eyebrow { color: var(--blue-600); }
.section-head h2 { font-size: var(--fs-h2); font-weight: 600; }
.lede { margin-top: 1.1rem; font-size: var(--fs-lg); color: var(--gray); max-width: 40rem; }
.theme-light .lede { color: var(--ink-3); }

/* ── buttons ──────────────────────────── */
.btn { --h: 48px; display: inline-flex; align-items: center; gap: .55rem; height: var(--h); padding: 0 1.25rem; border-radius: 999px; font: 500 var(--fs-sm)/1 var(--font); text-decoration: none; border: 1px solid transparent; transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), color .2s; white-space: nowrap; }
.btn-sm { --h: 40px; padding: 0 1rem; font-size: var(--fs-xs); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-600); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(148, 163, 184, .35); color: var(--white); background: rgba(255, 255, 255, .03); }
.btn-ghost:hover { border-color: var(--cyan); background: rgba(56, 189, 248, .08); }
.btn .icon { width: 1.05em; height: 1.05em; }
.btn-primary .icon:last-child { transition: transform .2s var(--ease); }
.btn-primary:hover .icon:last-child { transform: translateX(3px); }

.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; font-size: var(--fs-sm); color: var(--blue-600); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
.theme-dark .link-arrow, .theme-slate .link-arrow { color: var(--cyan); }

/* ── header ───────────────────────────── */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.site-header.is-open { background: var(--navy) !important; }
.site-header.is-scrolled, .page-project .site-header, .site-header.is-open { background: rgba(11, 18, 32, .82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom-color: var(--line-dark); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 600; letter-spacing: -.01em; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font: 600 .8rem/1 var(--mono); background: linear-gradient(140deg, var(--blue), var(--cyan)); color: var(--navy); }
.nav-list { display: flex; gap: .25rem; list-style: none; }
.nav-list a { display: block; padding: .5rem .7rem; border-radius: 8px; font-size: var(--fs-sm); color: var(--gray-300); text-decoration: none; transition: color .2s, background-color .2s; }
.nav-list a:hover { color: var(--white); background: rgba(255, 255, 255, .05); }
.nav-list a.is-active { color: var(--white); }
.nav-list a.is-active::after { content: ""; display: block; height: 2px; margin-top: 4px; border-radius: 2px; background: var(--cyan); }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-dark); background: transparent; color: var(--white); align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }
.mobile-nav { padding: .5rem 1.25rem 1.5rem; border-top: 1px solid var(--line-dark); }
.mobile-nav ul { list-style: none; display: grid; gap: .15rem; margin-bottom: 1rem; }
.mobile-nav a:not(.btn) { display: block; padding: .8rem .25rem; font-size: 1.125rem; text-decoration: none; color: var(--gray-300); border-bottom: 1px solid var(--line-dark); }
.mobile-nav a.is-active { color: var(--white); }
.mobile-cta { width: 100%; justify-content: center; }

@media (max-width: 1100px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (min-width: 1101px) { .mobile-nav { display: none !important; } }

/* ── hero ─────────────────────────────── */
.hero { min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 3rem) 0 5rem; position: relative; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg-img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 78% 40%, rgba(59, 130, 246, .22), transparent 70%), linear-gradient(180deg, rgba(11, 18, 32, .2) 0%, rgba(11, 18, 32, .65) 75%, var(--navy) 100%); }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--cyan); stroke-width: 1; opacity: .18; }
.hero-lines path { stroke-dasharray: 6 10; animation: drift 40s linear infinite; }
.hero-lines path:nth-child(2) { opacity: .6; animation-duration: 55s; }
.hero-lines path:nth-child(3) { opacity: .4; animation-duration: 70s; animation-direction: reverse; }
@keyframes drift { to { stroke-dashoffset: -800; } }

.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 4vw, 5rem); align-items: center; }
.hero-hello { font-family: var(--mono); font-size: var(--fs-sm); color: var(--cyan); margin-bottom: 1.1rem; }
.hero h1 { font-size: var(--fs-h1); font-weight: 650; letter-spacing: -.035em; line-height: 1; }
.hero-headline { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; margin-top: 1.4rem; font-size: clamp(1rem, .9rem + .3vw, 1.125rem); font-weight: 500; color: var(--gray-300); }
.hero-headline span:not(.sr-only) + .sr-only + span::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); vertical-align: middle; margin-right: .7rem; position: relative; top: -2px; }
.hero-headline .sr-only + span { white-space: nowrap; }
.hero-intro { margin-top: 1.5rem; max-width: 36rem; color: var(--gray); font-size: var(--fs-base); }
.hero-loc { margin-top: 1.25rem; display: inline-flex; align-items: center; gap: .45rem; font-size: var(--fs-sm); color: var(--gray-300); }
.hero-loc .icon { color: var(--cyan); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }

.hero-media { position: relative; justify-self: end; width: 100%; max-width: 460px; }
.portrait-frame { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--slate); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(148, 163, 184, .18); }
.portrait-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); pointer-events: none; }
.portrait { width: 100%; height: 100%; object-fit: cover; object-position: 46% 30%; }
.hero-card { position: absolute; left: -1.75rem; bottom: 2rem; display: grid; gap: .15rem; padding: .85rem 1.1rem; border-radius: 14px; background: rgba(23, 35, 56, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line-dark); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }
.hero-card-k { font: 500 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
.hero-card-v { font-size: var(--fs-sm); font-weight: 500; }

@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 2rem); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; justify-self: start; max-width: 420px; }
  .portrait-frame { aspect-ratio: 1 / 1; border-radius: 22px; }
  .portrait { object-position: 48% 22%; }
  .hero-card { left: auto; right: -.5rem; bottom: 1rem; }
}
@media (max-width: 520px) {
  .hero-media { max-width: none; }
  .hero-card { right: .75rem; }
  .hero-ctas .btn { flex: 1 1 100%; justify-content: center; }
}

/* ── about ────────────────────────────── */
.about-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(2.5rem, 5vw, 5.5rem); align-items: center; }
.about-media { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(11, 18, 32, .45); }
.about-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 66% 40%; }
@media (max-width: 900px) { .about-media img { aspect-ratio: 3 / 2; object-position: 60% 40%; } }
.about-copy .section-head { margin-bottom: 1.5rem; }
.prose p + p { margin-top: 1rem; }
.theme-light .prose { color: var(--ink-2); }
.highlights { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 2rem; }
.highlights li { padding: 1rem 1.1rem; border-radius: 14px; background: var(--white); border: 1px solid var(--line-light); display: grid; gap: .2rem; }
.highlights strong { font-weight: 600; font-size: var(--fs-sm); color: var(--ink); line-height: 1.35; }
.highlights span { font-size: var(--fs-xs); color: var(--ink-3); }
.langs { display: flex; align-items: center; gap: .6rem; margin-top: 1.5rem; font-size: var(--fs-sm); color: var(--ink-3); }
.langs .icon { color: var(--blue-600); }
.langs strong { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .highlights { grid-template-columns: 1fr; } }

/* ── decorative section art ───────────── */
.section-art { position: absolute; z-index: -1; right: -10%; top: 0; width: 60%; opacity: .14; pointer-events: none; mask-image: linear-gradient(to left, #000 20%, transparent 90%); -webkit-mask-image: linear-gradient(to left, #000 20%, transparent 90%); }
.section-art img { width: 100%; }
.section-art-right { top: auto; bottom: -5%; }

/* ── experience timeline ──────────────── */
.timeline { list-style: none; display: grid; gap: 2rem; position: relative; }
.tl-item { display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 220px; margin-left: 1.25rem; top: .45rem; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(56, 189, 248, .15); transform: translateX(-50%); }
.timeline::before { content: ""; position: absolute; left: calc(220px + 1.25rem); top: .5rem; bottom: .5rem; width: 1px; background: var(--line-dark); }
.tl-meta { text-align: right; padding-top: .1rem; }
.tl-dates { font-weight: 600; font-size: var(--fs-sm); }
.tl-type { font-size: var(--fs-xs); color: var(--gray); margin-top: .25rem; font-family: var(--mono); }
.tl-card { padding: clamp(1.5rem, 1rem + 2vw, 2.25rem); border-radius: var(--radius); background: rgba(11, 18, 32, .55); border: 1px solid var(--line-dark); }
.tl-card h3 { font-size: var(--fs-h3); }
.tl-org { margin-top: .4rem; color: var(--gray-300); font-weight: 500; }
.tl-org a { color: var(--cyan); text-decoration: none; }
.tl-org a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tl-summary { margin-top: 1rem; color: var(--gray-300); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 1.75rem 0; }
.metrics div { display: flex; flex-direction: column-reverse; gap: .35rem; padding: 1.1rem 1.2rem; border-radius: 14px; background: linear-gradient(180deg, rgba(59, 130, 246, .12), rgba(59, 130, 246, .03)); border: 1px solid rgba(59, 130, 246, .25); }
.metrics dd { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); font-weight: 650; letter-spacing: -.03em; line-height: 1; }
.metrics dt { font-size: var(--fs-xs); color: var(--gray-300); line-height: 1.4; }
.ticks { list-style: none; display: grid; gap: .6rem; }
.ticks li { position: relative; padding-left: 1.5rem; color: var(--gray-300); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 5px; border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(-45deg) translateY(-50%); }
.theme-light .ticks li { color: var(--ink-2); }
.theme-light .ticks li::before { border-color: var(--blue-600); }
@media (max-width: 760px) {
  .tl-item { grid-template-columns: 1fr; gap: .75rem; padding-left: 1.75rem; }
  .tl-meta { text-align: left; }
  .timeline::before { left: 4px; }
  .tl-item::before { left: 4px; margin-left: 0; }
  .metrics { grid-template-columns: 1fr; }
}

/* ── chips ────────────────────────────── */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; }
.chips li { font-size: var(--fs-xs); padding: .38rem .7rem; border-radius: 999px; border: 1px solid var(--line-dark); background: rgba(255, 255, 255, .03); color: var(--gray-300); line-height: 1.2; }
.tl-card .chips { margin-top: 1.25rem; }
.chips-light li { border-color: var(--line-light); background: var(--soft); color: var(--ink-2); }

/* ── projects ─────────────────────────── */
.projects { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.project article { height: 100%; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line-light); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.project article:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -35px rgba(11, 18, 32, .35); border-color: #CBD5E1; }
.project-featured { grid-column: span 1; }
.project:first-child { grid-column: 1 / -1; }
.project:first-child article { flex-direction: row; }
.project:first-child .cover { flex: 1.1; min-height: 340px; }
.project:first-child .project-body { flex: 1; }
.project-body { padding: 1.6rem 1.6rem 1.75rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.project-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.project-cat { font: 500 var(--fs-xs)/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--blue-600); }
.project h3 { font-size: var(--fs-h3); }
.project-body > p { color: var(--ink-2); font-size: var(--fs-sm); }
.project-role { font-size: var(--fs-sm); color: var(--ink-3) !important; }
.project-role strong { color: var(--ink); font-weight: 600; }
.project-outcome { font-weight: 600; color: var(--ink) !important; padding: .6rem .85rem; border-radius: 10px; background: #EFF6FF; border: 1px solid #DBEAFE; font-size: var(--fs-sm); }
.project-actions { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: auto; padding-top: .5rem; }
.status { font: 500 .72rem/1 var(--mono); padding: .4rem .6rem; border-radius: 999px; white-space: nowrap; display: inline-flex; align-items: center; gap: .4rem; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-operational { color: #047857; background: #ECFDF5; }
.status-in-progress { color: #B45309; background: #FFFBEB; }
.status-planned { color: var(--ink-3); background: #F1F5F9; }
.theme-dark .status-operational { color: #6EE7B7; background: rgba(16, 185, 129, .12); }
.theme-dark .status-in-progress { color: #FCD34D; background: rgba(245, 158, 11, .12); }

.cover { position: relative; display: flex; flex-direction: column; min-height: 190px; background: radial-gradient(120% 90% at 100% 0%, rgba(56, 189, 248, .25), transparent 55%), linear-gradient(160deg, var(--slate) 0%, var(--navy) 100%); color: var(--white); overflow: hidden; }
.cover::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); }
.cover-bar { display: flex; align-items: center; gap: 6px; padding: .8rem 1rem; border-bottom: 1px solid var(--line-dark); position: relative; z-index: 1; }
.cover-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(148, 163, 184, .35); }
.cover-bar em { font: normal .72rem/1 var(--mono); color: var(--gray); margin-left: .75rem; padding: .3rem .7rem; border-radius: 6px; background: rgba(255, 255, 255, .04); }
.cover-body { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; padding: 1.5rem; }
.cover-glyph { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: rgba(59, 130, 246, .16); border: 1px solid rgba(56, 189, 248, .3); color: var(--cyan); }
.cover-glyph .icon { width: 26px; height: 26px; }
.cover-code { font: .78rem/1.7 var(--mono); color: var(--gray-300); }
.cover-code b { font-weight: 500; color: #C084FC; }
.cover-code i { font-style: normal; color: #7DD3FC; }
.project:first-child .cover-glyph { width: 72px; height: 72px; }
.project:first-child .cover-glyph .icon { width: 34px; height: 34px; }
.project:first-child .cover-code { font-size: .9rem; }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }

@media (max-width: 900px) {
  .projects { grid-template-columns: 1fr; }
  .project:first-child article { flex-direction: column; }
  .project:first-child .cover { min-height: 200px; }
  .cover { min-height: 160px; }
}

.case-inline { border-top: 1px solid var(--line-light); padding-top: .8rem; }
.case-inline summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; font-size: var(--fs-sm); color: var(--blue-600); }
.case-inline summary::-webkit-details-marker { display: none; }
.case-inline summary .icon { transition: transform .2s var(--ease); }
.case-inline[open] summary .icon { transform: rotate(90deg); }
.case-inline .case { margin-top: 1rem; }
.case-inline h4 { font-size: 1rem; margin: 1.25rem 0 .5rem; color: var(--ink); }
.case-inline h4:first-child { margin-top: 0; }
.case-inline p, .case-inline li { font-size: var(--fs-sm); }

/* ── skills ───────────────────────────── */
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.skill-card { padding: 1.5rem; border-radius: var(--radius); background: rgba(23, 35, 56, .7); border: 1px solid var(--line-dark); transition: border-color .25s, background-color .25s; }
.skill-card:hover { border-color: rgba(56, 189, 248, .45); background: rgba(23, 35, 56, .95); }
.skill-card h3 { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; margin-bottom: 1rem; }
.skill-card h3 .icon { color: var(--cyan); width: 20px; height: 20px; }

/* ── education ────────────────────────── */
.edu-card { display: grid; grid-template-columns: auto 1fr; gap: 1.75rem; padding: clamp(1.75rem, 1rem + 3vw, 3rem); border-radius: 24px; background: var(--white); border: 1px solid var(--line-light); box-shadow: 0 30px 60px -45px rgba(11, 18, 32, .35); }
.edu-mark { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(140deg, var(--blue), var(--cyan)); color: var(--white); }
.edu-main h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.edu-degree { margin-top: .4rem; font-size: var(--fs-lg); font-weight: 500; color: var(--ink-2); }
.edu-main > .muted { margin-top: .25rem; font-size: var(--fs-sm); }
.edu-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--line-light); }
.edu-facts dt { font: 500 var(--fs-xs)/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.edu-facts dd { margin: .45rem 0 0; font-weight: 600; color: var(--ink); }
@media (max-width: 760px) { .edu-card { grid-template-columns: 1fr; } .edu-facts { grid-template-columns: 1fr 1fr; } }

/* ── achievements ─────────────────────── */
.honors { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.honor { padding: 1.75rem; border-radius: var(--radius); background: rgba(11, 18, 32, .5); border: 1px solid var(--line-dark); }
.honor .icon { color: var(--cyan); margin-bottom: 1.25rem; }
.honor h3 { font-size: 1.15rem; line-height: 1.3; }
.honor p { margin-top: .45rem; color: var(--gray-300); font-size: var(--fs-sm); }
.honor p.muted { margin-top: .15rem; color: var(--gray); font-size: var(--fs-xs); }
.sub-h { font-size: var(--fs-h3); margin: 3.5rem 0 1.25rem; }
.certs { list-style: none; display: grid; gap: 1rem; }
.cert { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem; padding: 1.4rem 1.6rem; border-radius: var(--radius); background: linear-gradient(110deg, rgba(59, 130, 246, .14), rgba(11, 18, 32, .5) 60%); border: 1px solid rgba(59, 130, 246, .28); }
.cert-ic { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: rgba(56, 189, 248, .12); color: var(--cyan); }
.cert-issuer { font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.cert h4 { font-size: 1.2rem; margin-top: .35rem; }
.cert .muted { font-size: var(--fs-sm); margin-top: .2rem; }
@media (max-width: 900px) { .honors { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .cert { grid-template-columns: auto 1fr; } .cert .btn { grid-column: 1 / -1; justify-content: center; } }

/* ── interests ────────────────────────── */
.interests { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.interest { border-radius: var(--radius); overflow: hidden; background: var(--slate); border: 1px solid var(--line-dark); transition: transform .3s var(--ease), border-color .3s; }
.interest:hover { transform: translateY(-3px); border-color: rgba(56, 189, 248, .4); }
.interest-img { aspect-ratio: 2 / 1; overflow: hidden; }
.interest-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.interest:hover .interest-img img { transform: scale(1.04); }
.interest h3 { font-size: 1.1rem; padding: 1.25rem 1.4rem 0; }
.interest p { padding: .45rem 1.4rem 1.5rem; font-size: var(--fs-sm); color: var(--gray); }
@media (max-width: 1000px) { .interests { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .interests { grid-template-columns: 1fr; } }

/* ── contact ──────────────────────────── */
.contact-bg { position: absolute; inset: 0; z-index: -1; }
.contact-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.contact-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--navy) 0%, rgba(11, 18, 32, .5) 40%, rgba(11, 18, 32, .75) 100%); }
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.contact .section-head { margin-bottom: 1.5rem; }
.tagline { font-size: var(--fs-lg); font-weight: 500; color: var(--white); max-width: 32rem; border-left: 2px solid var(--cyan); padding-left: 1.1rem; }
.contact-list { list-style: none; display: grid; gap: .6rem; }
.contact-list li { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: .9rem; padding: 1rem 1.2rem; border-radius: 14px; background: rgba(23, 35, 56, .75); border: 1px solid var(--line-dark); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .2s; }
.contact-list li:hover { border-color: rgba(56, 189, 248, .45); }
.c-ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: rgba(59, 130, 246, .15); color: var(--cyan); }
.c-label { font: 500 var(--fs-xs)/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gray); min-width: 5.5rem; }
.c-val { justify-self: end; text-align: right; font-weight: 500; font-size: var(--fs-sm); text-decoration: none; color: var(--white); overflow-wrap: anywhere; }
.c-val::after { content: ""; position: absolute; inset: 0; }
.contact-list li { position: relative; }
.c-val:hover { color: var(--cyan); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .contact-list li { grid-template-columns: auto 1fr; } .c-label { display: none; } .c-val { justify-self: start; text-align: left; } }

/* ── footer ───────────────────────────── */
.site-footer { background: var(--navy); border-top: 1px solid var(--line-dark); padding: 2rem 0; font-size: var(--fs-xs); color: var(--gray); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { text-decoration: none; color: var(--gray-300); }
.footer-links a:hover { color: var(--white); }

/* ── project detail page ──────────────── */
.project-hero { padding-top: calc(var(--header-h) + 4rem); }
.project-hero h1 { font-size: clamp(2.5rem, 1.6rem + 3.5vw, 4.25rem); letter-spacing: -.035em; }
.crumb { margin-bottom: 2rem; font-size: var(--fs-sm); }
.crumb a { color: var(--gray-300); text-decoration: none; }
.crumb a:hover { color: var(--white); }
.project-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.75rem; }
.case h2 { font-size: var(--fs-h3); margin: 2.75rem 0 1rem; color: var(--ink); }
.case h2:first-child { margin-top: 0; }
.case p { color: var(--ink-2); }
.case .ticks { margin-top: .25rem; }
.case > p:last-child { margin-top: 3rem; }

/* ── reveal (only when JS is on) ──────── */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .hero-bg, .section-art, .contact-bg { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}


/* Refinements, November 2026: mobile first-impression and keyboard navigation */
@media (max-width: 900px) {
  .hero-media { order: 0; max-width: 400px; justify-self: center; }
  .hero-grid > :first-child { order: -1; }
  .hero { padding-top: calc(var(--header-h) + 1.35rem); }
}
@media (max-width: 520px) {
  .hero-media { max-width: 340px; width: 100%; margin-inline: auto; }
  .portrait-frame { aspect-ratio: 4 / 3; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 4rem); }
  .hero-ctas { gap: .6rem; }
}
:where(a, button, summary):focus-visible { outline: 3px solid #38BDF8; outline-offset: 4px; }


/* ── WordPress additions ─────────────── */
.resume-note { font-size: .86rem; color: #94a3b8; margin-top: .8rem; }
.ah-empty { padding: 2rem; border: 2px dashed currentColor; border-radius: var(--radius); opacity: .7; text-align: center; font-size: var(--fs-sm); }
.ah-generic { padding-top: calc(var(--header-h) + 4rem); min-height: 60vh; }
.ah-prose-wrap { max-width: 820px; }
.ah-page-title { font-size: var(--fs-h2); line-height: 1.1; margin: 0 0 1.5rem; letter-spacing: -.02em; }
.ah-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.ah-content a { color: var(--blue-600); }
.ah-pagination { padding: 2rem 0 4rem; display: flex; gap: .75rem; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.nav-list .current-menu-item > a { color: inherit; }
