/* Nayem Hossain — native portfolio. Warm off-white, black ink, one green availability dot. */
:root {
  --bg: #F4F2EC;
  --surface: #FFFFFF;
  --ink: #111111;
  --muted: #666666;
  --line: #E7E4DC;
  --green: #22C55E;
  --accent: #F43F5E;
  --map-bg: #EFEDE6;
  --map-line: #D8D4C8;
  --shadow: 0 10px 30px rgba(17, 17, 17, .07);
  --shadow-lg: 0 24px 50px rgba(17, 17, 17, .12);
  --radius: 18px;
}
html.dark {
  --bg: #141210;
  --surface: #1E1B18;
  --ink: #F5F3EE;
  --muted: #A8A29A;
  --line: #2E2A26;
  --map-bg: #26221E;
  --map-line: #3A352E;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 50px rgba(0, 0, 0, .45);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 3px;
}
::selection { background: var(--ink); color: var(--bg); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px;
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(17, 17, 17, .05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.accent { color: var(--accent); }
.main-nav { display: flex; gap: 32px; }
.main-nav a { font-size: 15px; color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease; }
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.header-right { display: flex; align-items: center; gap: 12px; }
.avail { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.avail .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .2s ease;
}
.icon-btn:hover { border-color: var(--ink); }
html.dark .icon-sun { display: none; }
html:not(.dark) .icon-moon { display: none; }
.menu-btn { display: none; }
.mobile-menu {
  display: none; flex-direction: column; gap: 4px;
  padding: 12px 24px 20px; border-top: 1px solid var(--line);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 10px 0; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--line); }
.mobile-menu .avail { padding-top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { opacity: .88; }
.btn-outline { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.link-underline { font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.link-underline:hover { opacity: .7; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; scroll-margin-top: 80px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
h2 { font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -.035em; font-weight: 800; margin: 20px 0 0; }
.section-intro { color: var(--muted); font-size: 17px; max-width: 640px; margin-top: 16px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span {
  font-size: 12.5px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--line); background: var(--bg);
  padding: 5px 12px; border-radius: 999px;
}
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-text, .hero-photo { min-width: 0; }
.hero h1 {
  font-size: clamp(42px, 5.6vw, 68px); line-height: 1.04;
  letter-spacing: -.04em; font-weight: 800; overflow-wrap: break-word;
}
.hello-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #EDEAE3; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 14px; font-weight: 500; margin-bottom: 22px;
}
html.dark .hello-pill { background: var(--surface); }
.hello-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.hero-name { white-space: nowrap; }
.hero-role { display: block; }
.hero-sub { font-size: 19px; color: var(--muted); margin-top: 22px; }
/* Hero text fades in from the photo side (right), one line after another */
@keyframes hero-fade-in {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}
.hero-text > * { animation: hero-fade-in .7s ease both; }
.hero-text > *:nth-child(1) { animation-delay: .05s; }
.hero-text > *:nth-child(2) { animation-delay: .18s; }
.hero-text > *:nth-child(3) { animation-delay: .3s; }
.hero-text > *:nth-child(4) { animation-delay: .42s; }
.hero-text > *:nth-child(5) { animation-delay: .54s; }
.hero-cta { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 32px; }
.hero-meta { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 36px; font-size: 14px; color: var(--muted); }
.meta-item { display: inline-flex; align-items: center; gap: 7px; }
.meta-item svg { flex-shrink: 0; }
.meta-sep { width: 1px; height: 20px; background: var(--line); }
/* Hero photo: full-height, no frame — melts into the background with soft fades (left + bottom) */
.hero-photo { position: relative; align-self: stretch; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; }
.hero-photo::before, .hero-photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.hero-photo::before { background: linear-gradient(to right, var(--bg) 0%, transparent 30%); }
.hero-photo::after { background: linear-gradient(to bottom, transparent 60%, var(--bg) 97%); }

/* ---------- About ---------- */
#about { position: relative; overflow: hidden; }
#about::before, #about::after { content: ""; position: absolute; border-radius: 50%; z-index: 0; pointer-events: none; }
#about::before { width: 540px; height: 540px; right: -190px; bottom: -280px; background: #EAE6DB; }
#about::after { width: 340px; height: 340px; right: -70px; bottom: -180px; background: #EFECE4; }
html.dark #about::before { background: #221E1A; }
html.dark #about::after { background: #26221D; }
#about .container { position: relative; z-index: 1; }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.about-grid .card h3 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 20px; }
.build-items { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.build-item { text-align: center; }
.build-icon { color: var(--ink); margin: 0 auto 12px; }
.build-name { font-weight: 700; font-size: 15.5px; }
.build-desc { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tech-chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 8px 12px; background: var(--bg);
  text-align: center;
}
.tech-chip span { font-weight: 700; font-size: 15px; margin-top: 6px; }
.tech-chip small { font-size: 12.5px; color: var(--muted); }
.location-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.location-city { font-weight: 700; font-size: 17px; }
.location-tz { font-size: 13.5px; color: var(--muted); }
.flag-bd { border-radius: 3px; flex-shrink: 0; margin-top: 2px; }
.map { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 320/130; }
.coords { font-size: 13px; color: var(--muted); margin-top: 10px; font-variant-numeric: tabular-nums; }

/* ---------- Work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.work-card { padding: 0; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cover { aspect-ratio: 4/3.1; display: flex; align-items: center; justify-content: center; padding: 22px; overflow: hidden; }
.cover-orange { background: #F97316; }
.cover-light { background: #EDEBE4; }
html.dark .cover-light { background: #2A2622; }
.cover-dark { background: #171717; }
.work-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work-body h3 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat-pill { font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.work-body p { font-size: 14.5px; color: var(--muted); }
.work-link { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.work-card:hover .work-link { text-decoration: underline; }
/* CSS-drawn cover illustrations (stylised, not screenshots) */
.phone { width: 118px; background: #111; border-radius: 20px; padding: 14px 12px 12px; color: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.3); }
.phone-notch { width: 44px; height: 5px; border-radius: 99px; background: #333; margin: 0 auto 10px; }
.phone-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.phone-thumb { height: 52px; border-radius: 8px; background: #F97316; margin-bottom: 8px; }
.phone-row { display: flex; gap: 6px; margin-bottom: 6px; }
.phone-row span { height: 22px; border-radius: 5px; background: #2A2A2A; flex: 1; }
.browser { width: 100%; max-width: 240px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 14px 30px rgba(0,0,0,.18); color: #111; }
.browser-bar { display: flex; align-items: center; gap: 5px; background: #F1EFE9; padding: 8px 10px; }
.browser-bar span { width: 8px; height: 8px; border-radius: 50%; background: #D8D4C8; }
.browser-bar i { flex: 1; height: 14px; border-radius: 99px; background: #fff; border: 1px solid #E7E4DC; font-style: normal; font-size: 9px; color: #999; display: flex; align-items: center; padding: 0 8px; }
.browser-hero { height: 52px; background: #111; margin: 10px; border-radius: 6px; }
.browser-grid { display: flex; gap: 8px; padding: 0 10px 12px; }
.browser-grid span { flex: 1; height: 34px; border-radius: 6px; background: #F1EFE9; }
.player { width: 100%; max-width: 200px; color: #fff; text-align: center; }
.player-album { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 10px; background: #EC4899; }
.player-track { font-size: 13px; font-weight: 700; }
.wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 26px; margin: 8px 0; }
.wave span { width: 3px; border-radius: 99px; background: #F5F3EE; }
.wave span:nth-child(odd) { height: 10px; } .wave span:nth-child(even) { height: 20px; }
.wave span:nth-child(3n) { height: 26px; }
.player-play { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; background: #fff; color: #111; display: flex; align-items: center; justify-content: center; font-size: 11px; padding-left: 2px; }
.codewin { width: 100%; max-width: 240px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 14px 30px rgba(0,0,0,.18); color: #111; }
.code-lines { padding: 14px; display: grid; gap: 9px; }
.code-lines span { height: 8px; border-radius: 99px; background: #E7E4DC; }
.code-lines span:nth-child(2) { background: #FDBA74; }
.code-lines span:nth-child(4) { background: #93C5FD; }
/* More projects */
.more-projects { margin-top: 56px; }
.more-head h3 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.more-head p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.project-list { margin-top: 20px; border-top: 1px solid var(--ink); }
.project-row {
  display: grid; grid-template-columns: 44px 1fr 170px 130px 40px; gap: 16px; align-items: center;
  padding: 16px 4px; border-bottom: 1px solid var(--line); cursor: pointer; background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; text-align: left; font-size: 15px; color: var(--ink);
}
.project-row:hover { background: var(--surface); }
.project-row .idx { font-size: 12px; font-weight: 700; color: var(--muted); }
.project-row b { font-size: 16px; }
.project-row .meta { color: var(--muted); font-size: 14px; }
.project-row .go { text-align: right; font-weight: 700; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.status-dot.progress::before { background: #F59E0B; }

/* ---------- Services / Journey ---------- */
.services-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
.service-card h3 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.service-card p { font-size: 14.5px; color: var(--muted); }
.timeline { margin-top: 40px; border-top: 1px solid var(--ink); }
.tl-row { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.tl-year { font-weight: 800; font-size: 15px; }
.tl-row h3 { font-size: 18px; font-weight: 700; }
.tl-row p { color: var(--muted); font-size: 15px; max-width: 640px; margin-top: 4px; }
.explore { margin-top: 48px; }
.explore h3 { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 500; }

/* Tighter join between Journey and Contact (avoids a big empty gap) */
.section#journey { padding-bottom: 48px; }
.section#contact { padding-top: 48px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.social-links { display: flex; gap: 24px; margin-top: 28px; }
.social-links a { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.social-links a:hover { text-decoration: underline; }
.form-card { padding: 32px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  padding: 13px 16px; font-size: 15px; font-family: inherit; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea { resize: vertical; min-height: 120px; }
.error { color: #DC2626; font-size: 13.5px; margin-top: 5px; min-height: 0; }
.error:empty { display: none; }
.honeypot { display: none; }
.form-note { font-size: 12.5px; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.form-success { text-align: center; padding: 24px 0; }
.form-success h3 { font-size: 20px; margin: 12px 0 6px; }
.form-success p { color: var(--muted); font-size: 15px; }

/* ---------- Footer / modal / to-top ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.modal-panel {
  position: relative; width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto;
  background: var(--surface); border-radius: 20px 20px 0 0; padding: 32px;
}
.modal-close { position: absolute; top: 16px; right: 16px; }
.modal-cat { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.modal-panel h3 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin-top: 8px; }
.modal-status { font-size: 14px; color: var(--muted); margin-top: 4px; }
.modal-overview { color: var(--muted); font-size: 15.5px; margin-top: 16px; }
.modal-panel h4 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 24px 0 10px; }
.modal-features { list-style: none; display: grid; gap: 8px; }
.modal-features li { font-size: 15px; color: var(--muted); padding-left: 18px; position: relative; }
.modal-features li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
#modalLink { margin-top: 24px; }
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%; border: none;
  background: var(--ink); color: var(--bg); display: none; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
}
.to-top.show { display: flex; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 72px; }
  /* Hero keeps its desktop layout on phone too: text left, photo right — just tighter */
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 20px; }
  .hero h1 { font-size: clamp(28px, 5.4vw, 44px); }
  .hero-sub { font-size: 16px; margin-top: 14px; }
  .hero-cta { gap: 16px; margin-top: 22px; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .project-row { grid-template-columns: 36px 1fr 40px; }
  .project-row .hide-m { display: none; }
}
@media (max-width: 820px) {
  .main-nav, .header-right .btn-outline, .avail-text { display: none; }
  .menu-btn { display: inline-flex; }
  .header-right .avail { display: none; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .work-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .tl-row { grid-template-columns: 1fr; gap: 4px; }
  /* Hero on small phones, exactly like the reference: huge name on two lines,
     red role line, buttons side-by-side, meta in one row — spilling into the photo's fade zone */
  .hero { padding: 36px 0 56px; }
  .hero-grid { gap: 14px; grid-template-columns: 1.15fr .85fr; }
  .hero h1 { font-size: clamp(34px, 10.5vw, 44px); }
  .name-line { display: block; }
  .hero-role { font-size: .68em; white-space: nowrap; }
  .hello-pill { font-size: 12px; padding: 6px 12px; margin-bottom: 14px; }
  .hero-sub { font-size: 13px; margin-top: 10px; }
  .hero-cta { flex-direction: row; flex-wrap: nowrap; gap: 8px; margin-top: 18px; }
  .hero-cta .btn { min-height: 38px; padding: 9px 12px; font-size: 12px; white-space: nowrap; }
  .hero-meta { flex-wrap: nowrap; margin-top: 18px; font-size: 11.5px; gap: 10px; }
  .meta-item:first-child { max-width: 120px; }
  .hero-meta .meta-item { flex-shrink: 0; }
  .form-card { padding: 24px 20px; }
  .modal-panel { padding: 24px 20px; border-radius: 20px 20px 0 0; }
  .build-items { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .services-grid { grid-template-columns: 1fr; }
  .hero-sub { font-size: 13px; }
  .btn { padding: 12px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-text > * { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* =====================================================================
   v6 — professional polish: full-bleed faded hero photo, type, depth
   ===================================================================== */
:root { --font-display: Montserrat, Inter, system-ui, sans-serif; --ring: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
h1, h2, .logo, .work-body h3, .more-head h3 { font-family: var(--font-display); }
body { text-rendering: optimizeLegibility; }

/* Header: transparent over the hero, glass once scrolled */
.site-header { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.icon-btn { box-shadow: var(--shadow); }
.main-nav a.active { border-bottom-color: var(--accent); }

/* Hero: photo bleeds to the top-right edge and melts into the page (left, bottom, top) */
.hero { position: relative; overflow: hidden; margin-top: -68px; padding: 148px 0 120px; min-height: min(900px, 100vh); display: flex; align-items: center; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(60% 55% at 85% 20%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%); }
.hero .container { width: 100%; }
.hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
.hero-text { max-width: 620px; position: relative; z-index: 2; }
.hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: min(56%, 820px); z-index: -1; align-self: auto; }
.hero-photo::before, .hero-photo::after { display: none; }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 58% 18%;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 42%), linear-gradient(to bottom, transparent 0, #000 9%, #000 68%, transparent 98%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 42%), linear-gradient(to bottom, transparent 0, #000 9%, #000 68%, transparent 98%);
  mask-composite: intersect;
}
html.dark .hero-photo img { filter: brightness(.88) contrast(1.04); }
.hero h1 { font-size: clamp(46px, 6.2vw, 84px); line-height: 1; letter-spacing: -.045em; }
.hero-role { font-size: .56em; line-height: 1.12; letter-spacing: -.03em; margin-top: .22em; }
.hero-sub { font-size: clamp(17px, 1.6vw, 21px); max-width: 30ch; }
.hello-pill { box-shadow: var(--shadow); }
.btn-dark { box-shadow: 0 10px 24px rgba(17,17,17,.22); }
.btn:hover { transform: translateY(-2px); }
.btn-dark:hover { opacity: 1; background: color-mix(in srgb, var(--ink) 86%, var(--accent)); }
html.dark .btn-dark { box-shadow: none; }
.hero-meta { max-width: 460px; }

/* Sections, cards, type rhythm */
h2 { letter-spacing: -.04em; }
.section-intro { line-height: 1.7; }
.section-intro strong { color: var(--ink); font-weight: 600; }
.card { border-radius: 22px; }
.about-grid .card:hover, .service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.work-card { border-radius: 22px; }
.work-card:hover .cover { filter: saturate(1.08); }
.cover { transition: filter .3s ease; }
.service-card { position: relative; overflow: hidden; }
.service-card::before { content: ""; position: absolute; left: 28px; top: 0; width: 36px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.service-card h3 { margin-top: 8px; }
.tl-row { transition: background-color .2s ease; position: relative; }
.tl-row:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.tl-year { color: var(--accent); }
.field input:focus, .field textarea:focus { box-shadow: var(--ring); border-color: var(--ink); }
.project-row { transition: padding-left .2s ease, background-color .2s ease; }
.project-row:hover { padding-left: 14px; }
.site-footer { background: var(--surface); }

/* Responsive hero — mirrors the phone preview: text left, photo bleeding right, fades into page */
@media (max-width: 900px) {
  .hero { padding: 120px 0 96px; min-height: 0; }
  .hero-photo { width: 62%; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(40px, 9vw, 72px); }
}
@media (max-width: 640px) {
  .hero { margin-top: -68px; padding: 116px 0 150px; min-height: 640px; align-items: flex-start; }
  .hero-photo { width: 58%; bottom: 40px; }
  .hero-photo img { object-position: 66% 8%; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 55%), linear-gradient(to bottom, transparent 0, #000 9%, #000 66%, transparent 96%); mask-image: linear-gradient(to right, transparent 0, #000 55%), linear-gradient(to bottom, transparent 0, #000 9%, #000 66%, transparent 96%); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(38px, 11.5vw, 52px); }
  .hero-role { font-size: .6em; }
  .hero-sub { font-size: 15.5px; max-width: 22ch; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { min-height: 46px; padding: 11px 20px; font-size: 14px; }
  .hero-meta { flex-wrap: wrap; font-size: 13px; margin-top: 26px; }
  .meta-item:first-child { max-width: none; }
  .service-card::before { left: 20px; }
}
@media (max-width: 400px) { .hero-cta .btn { padding: 11px 16px; } }
