/* Prathiksha Dhandapani portfolio — built from the approved Module 9/10 design system.
   Layout: 1440 frame, 64px margins (1312 content), 12-col desktop; 390 mobile, 20px margins. */
:root {
  --bg: #f4f1e8;        /* page */
  --subtle: #eeefe9;    /* panels, thumbnails */
  --ink: #18171d;       /* text, primary buttons, footer */
  --ink-hover: #3d3c42; /* primary button hover (Ink 70) */
  --body: #4a4843;      /* body copy */
  --muted: #5e5c56;     /* metadata */
  --label: #8b6a4b;     /* eyebrow labels */
  --line: #bca88f;      /* dividers, chip borders */
  --accent: #f6ae1c;    /* signal yellow: active nav, footer links */
  --rust: #b2452e;      /* focus ring, before label, errors */
  --blush: #fbe9e1;
  --sage-bg: #eaf0e8;
  --sage: #778377;
  --on-dark: #f4f1e8;
  --on-dark-muted: #a2a19d;
  --white: #ffffff;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ui: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --max: 1312px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; color: var(--ink); }
p { margin: 0; }

/* Focus: 3px rust outline, 2px offset, on every interactive element */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--on-dark); padding: 10px 16px; border-radius: 24px; font-family: var(--ui); font-weight: 600; text-decoration: none; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }

.wrap { max-width: calc(var(--max) + 128px); margin: 0 auto; padding-left: max(64px, env(safe-area-inset-left, 0px)); padding-right: max(64px, env(safe-area-inset-right, 0px)); }

.label { font-family: var(--ui); font-weight: 600; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.lead { font-size: 20px; color: var(--body); max-width: 760px; }
.body { color: var(--body); max-width: 820px; }

/* ---------- Navigation ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.nav { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-family: var(--display); font-size: 30px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand .short { display: none; }
.nav-links { display: flex; align-items: center; gap: 40px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-family: var(--ui); font-weight: 500; font-size: 16px; color: var(--body); text-decoration: none; padding: 8px 0; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: transparent; transition: background .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { background: var(--line); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after { background: var(--accent); }
.nav-end { display: flex; align-items: center; gap: 40px; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 22px; cursor: pointer; padding: 0; color: var(--ink); }
.menu-btn span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px auto; }

/* ---------- Buttons & links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 28px; border-radius: 24px; background: var(--ink); color: var(--white); font-family: var(--ui); font-weight: 600; font-size: 15px; text-decoration: none; border: 0; cursor: pointer; transition: background .15s, transform .1s; }
.btn:hover { background: var(--ink-hover); }
.btn:active { background: #000; transform: translateY(1px); }
.btn[disabled] { background: #d9d6cd; color: #8e8c86; cursor: not-allowed; }
.text-link { font-family: var(--ui); font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.text-link:hover { border-bottom-color: var(--accent); }

/* ---------- Home hero ---------- */
.hero { padding-block: 82px 72px; display: grid; grid-template-columns: minmax(0, 1fr) 276px; gap: 36px; align-items: start; }
.hero h1 { font-size: 76px; line-height: 1.02; margin-top: 16px; max-width: 1000px; }
.hero .lead { margin-top: 32px; }
.hero-actions { display: flex; align-items: center; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.facts-card { background: var(--ink); color: var(--on-dark); border-radius: 20px; padding: 28px; display: grid; gap: 22px; margin-top: 30px; }
.facts-card .label { color: var(--accent); }
.facts-card p { font-family: var(--display); font-size: 26px; line-height: 1.1; }

/* ---------- Work grid ---------- */
.section-head { border-top: 1px solid var(--line); padding-top: 40px; display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 44px; line-height: 1.1; margin-top: 10px; }
.section-head .count { font-weight: 500; font-size: 16px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 32px; padding-block: 42px 96px; }
.card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; border-radius: 16px; }
.card .thumb { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--subtle); margin-bottom: 12px; transition: transform .25s, box-shadow .25s; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card h3 { font-size: 32px; line-height: 1.1; }
.card p { color: var(--body); font-size: 16px; }
.card .more { font-family: var(--ui); font-weight: 600; font-size: 15px; margin-top: 4px; }
.card .more.soon { color: var(--muted); font-weight: 500; }
a.card:hover .thumb { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(24, 23, 29, .14); }
a.card:hover .thumb img { transform: scale(1.05); }
a.card:hover .more { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a.card:focus-visible { outline-offset: 6px; border-radius: 16px; }

/* ---------- About teaser ---------- */
.band { background: var(--subtle); }
.teaser { padding-block: 72px; display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 600px); justify-content: space-between; gap: 48px; }
.teaser h2 { font-size: 44px; line-height: 1.1; margin-top: 12px; }
.teaser .body { display: grid; gap: 40px; justify-items: start; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); }
.foot { padding-block: 44px; display: grid; grid-template-columns: 1fr auto; gap: 32px 24px; align-items: end; }
.foot h2 { color: var(--on-dark); font-size: 40px; line-height: 1.1; grid-column: 1 / -1; }
.foot ul { display: flex; gap: 40px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.foot a { font-family: var(--ui); font-weight: 500; font-size: 15px; color: var(--accent); text-underline-offset: 3px; }
.foot a:hover { color: var(--on-dark); }
.foot small { color: var(--on-dark-muted); font-size: 13px; }
.site-footer :focus-visible { outline-color: var(--accent); }

/* ---------- Case study ---------- */
.back { display: inline-block; margin-top: 40px; font-family: var(--ui); font-weight: 600; font-size: 15px; text-decoration: none; padding: 4px 0; }
.back:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.cs-head { padding-block: 40px 0; }
.cs-head h1 { font-size: 72px; line-height: 1.02; margin-top: 16px; max-width: 980px; }
.cs-head .lead { font-size: 22px; margin-top: 32px; }
.meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 38px; margin: 56px 0 0; }
.meta div { display: grid; gap: 4px; }
.meta dt { margin: 0; }
.meta dd { margin: 0; font-weight: 500; font-size: 17px; }
.cs-hero { margin-top: 70px; border-radius: 20px; overflow: hidden; background: var(--subtle); }
.cs-hero img { width: 100%; }
.cs-section { padding-top: 80px; display: grid; gap: 12px; }
.cs-section h2 { font-size: 40px; line-height: 1.08; max-width: 900px; }
.cs-section > .body { margin-top: 8px; }
.problem { margin-top: 64px; background: var(--ink); border-radius: 20px; padding: 52px 56px; display: grid; gap: 12px; }
.problem .label { color: var(--accent); }
.problem blockquote { margin: 0; font-family: var(--display); font-style: italic; font-size: 40px; line-height: 1.1; color: var(--on-dark); }

/* Before / after */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; position: relative; }
.state { border-radius: 20px; padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 222px; gap: 24px; align-items: start; }
.state.before { background: var(--blush); }
.state.after { background: var(--subtle); }
.state .label { margin-bottom: 8px; }
.state.before .label { color: var(--rust); }
.state.after .label { color: var(--ink); }
.state h3 { font-size: 28px; line-height: 1.1; }
.state p { color: var(--body); font-size: 16px; margin-top: 20px; }
.state figure { margin: 12px 0; }
.state img { width: 222px; }
.arrow { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 48px; height: 48px; border-radius: 24px; background: var(--ink); color: var(--white); display: grid; place-items: center; font-size: 22px; }
.caption { margin-top: 16px; background: var(--white); border: 1px solid #e2ddd0; border-radius: 16px; padding: 24px 28px; display: grid; gap: 8px; }
.caption p { font-size: 18px; color: var(--ink); }
.said { margin-top: 16px; background: var(--sage-bg); border-radius: 20px; padding: 40px 28px; display: grid; grid-template-columns: minmax(0, 520px) 222px; justify-content: space-between; gap: 32px; align-items: center; padding-right: 120px; }
.said .label { color: var(--sage); }
.said h3 { font-size: 28px; margin-top: 8px; }
.said p { color: var(--body); font-size: 16px; margin-top: 20px; }
.said figure { margin: 0; }

.screens { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; margin-top: 40px; }
.screens figure { margin: 0; display: grid; gap: 10px; }
.screens figcaption { font-size: 14px; color: var(--muted); text-align: center; }

.next { margin-block: 80px; background: var(--subtle); border-radius: 20px; padding: 44px 40px; display: grid; gap: 8px; }
.next h2 { font-size: 44px; line-height: 1.1; }
.next p { color: var(--muted); font-size: 16px; }

/* ---------- About ---------- */
.about-hero { padding-block: 82px 64px; display: grid; gap: 32px; }
.about-hero h1 { font-size: 64px; line-height: 1.04; max-width: 860px; margin-top: 4px; }
.about-hero .body p + p { margin-top: 18px; }
.cv { border-top: 1px solid var(--line); padding-block: 40px 96px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 576px); gap: 48px; }
.cv h2 { font-family: var(--ui); }
.xp { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 22px; }
.xp li { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 0 24px; }
.xp time, .xp .when { font-weight: 500; font-size: 15px; color: var(--muted); padding-top: 4px; }
.xp strong, .edu strong { display: block; font-weight: 600; font-size: 22px; line-height: 1.4; }
.xp span, .edu span { font-size: 15px; color: var(--body); }
.edu { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 22px; }
.chips { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 8px 16px; font-weight: 500; font-size: 14px; }
.contact { padding-block: 72px; display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 616px); justify-content: space-between; gap: 48px; }
.contact h2 { font-size: 52px; line-height: 1.05; margin-top: 12px; }
.contact .body { margin-top: 32px; }
.contact dl { margin: 56px 0 0; display: grid; gap: 18px; }
.contact dd { margin: 0; font-family: var(--ui); font-weight: 600; font-size: 17px; }
.contact dd a { text-decoration: none; }
.contact dd a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.form { background: var(--white); border-radius: 20px; padding: 32px; display: grid; gap: 22px; align-content: start; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid #a2a19d; border-radius: 10px; padding: 13px 16px; width: 100%; }
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; border-color: var(--ink); background: var(--white); }
.field .err { color: var(--rust); font-size: 15px; }
.field[data-invalid] input, .field[data-invalid] textarea { border-color: var(--rust); }
.form-note { font-size: 15px; color: var(--body); background: var(--sage-bg); border-radius: 10px; padding: 14px 16px; }

/* ---------- Mobile (< 768px) ---------- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .facts-card { margin-top: 0; max-width: 420px; }
  .said { padding-right: 28px; }
  .screens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .state { grid-template-columns: 1fr; justify-items: center; }
  .state > div { justify-self: stretch; }
}
@media (max-width: 767px) {
  body { font-size: 17px; }
  .wrap { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .nav { height: 72px; }
  .brand { font-size: 24px; }
  .brand .full { display: none; }
  .brand .short { display: inline; }
  .menu-btn { display: block; }
  .nav-end { display: none; position: fixed; inset: 72px 0 0 0; background: var(--ink); flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 24px max(20px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); overflow-y: auto; }
  .nav-end.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links a { display: block; font-family: var(--display); font-weight: 400; font-size: 40px; color: var(--on-dark); padding: 14px 0; border-bottom: 1px solid rgba(244, 241, 232, .16); }
  .nav-links a::after { display: none; }
  .nav-links a:hover { color: var(--accent); }
  .nav-links a[aria-current="page"] { color: var(--accent); }
  .nav-end .btn { margin-top: 32px; background: var(--on-dark); color: var(--ink); width: 100%; }
  .nav-end :focus-visible { outline-color: var(--accent); }
  body.menu-open { overflow: hidden; }
  .hero { padding-block: 32px 48px; }
  .hero h1 { font-size: 40px; line-height: 1.04; }
  .hero .lead { font-size: 17px; margin-top: 24px; }
  .hero-actions .btn { width: 100%; }
  .section-head h2, .teaser h2, .next h2 { font-size: 32px; }
  .grid { grid-template-columns: 1fr; gap: 48px; padding-block: 32px 64px; }
  .card h3 { font-size: 28px; }
  .teaser { grid-template-columns: 1fr; padding-block: 56px; gap: 20px; }
  .foot { grid-template-columns: 1fr; padding-block: 40px; }
  .foot h2 { font-size: 30px; }
  .foot ul { flex-direction: column; gap: 10px; }
  .cs-head h1 { font-size: 38px; line-height: 1.05; }
  .cs-head .lead { font-size: 17px; margin-top: 16px; }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
  .cs-hero { margin-top: 40px; border-radius: 12px; }
  .cs-section { padding-top: 48px; }
  .cs-section h2 { font-size: 30px; }
  .problem { margin-top: 48px; padding: 28px 24px; }
  .problem blockquote { font-size: 28px; }
  .compare { grid-template-columns: 1fr; }
  .arrow { top: 50%; width: 40px; height: 40px; }
  .arrow span { display: inline-block; rotate: 90deg; }
  .state { padding: 20px; }
  .state img, .said img { width: 194px; }
  .said { grid-template-columns: 1fr; padding: 24px 20px; justify-items: start; }
  .said figure { justify-self: center; }
  .caption { padding: 20px; }
  .caption p { font-size: 16px; }
  .screens { gap: 16px; }
  .next { padding: 28px 24px; margin-block: 56px; }
  .about-hero { padding-block: 40px; }
  .about-hero h1 { font-size: 40px; }
  .cv { grid-template-columns: 1fr; padding-block: 32px 56px; }
  .xp li { grid-template-columns: 1fr; }
  .xp strong, .edu strong { font-size: 19px; }
  .contact { grid-template-columns: 1fr; padding-block: 56px; }
  .contact h2 { font-size: 36px; }
  .contact dl { margin-top: 32px; }
  .form { padding: 20px; }
  .form .btn { width: 100%; }
}

/* ---------- Case-study template additions ---------- */
.work { scroll-margin-top: 96px; }
#experience { scroll-margin-top: 96px; }
#contact { scroll-margin-top: 88px; }
.cs-hero { margin-inline: 0; margin-bottom: 0; }
.problem p:not(.label) { color: var(--on-dark-muted); max-width: 820px; font-size: 18px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; margin-top: 32px; }
.gallery.one { grid-template-columns: minmax(0, 1fr); }
.slide { margin: 0; display: grid; gap: 10px; align-content: start; }
.slide a { display: block; border-radius: 12px; overflow: hidden; background: var(--subtle); box-shadow: 0 1px 0 rgba(24, 23, 29, .06); }
.slide img { width: 100%; transition: transform .35s; }
.slide a:hover img { transform: scale(1.02); }
.slide figcaption { font-size: 14px; color: var(--muted); }
.caption ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 18px; color: var(--ink); }
.learn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 16px; }
.learn div { border-top: 2px solid var(--accent); padding-top: 16px; display: grid; gap: 8px; align-content: start; }
.learn h3 { font-size: 24px; line-height: 1.15; }
.learn p { color: var(--body); font-size: 16px; }
a.next { text-decoration: none; color: inherit; transition: background .15s; }
a.next:hover { background: #e6e7df; }
a.next:hover h2 { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
@media (max-width: 767px) {
  .gallery { grid-template-columns: 1fr; gap: 24px; }
  .learn { grid-template-columns: 1fr; }
  .caption ul { font-size: 16px; }
  .problem p:not(.label) { font-size: 16px; }
}

/* ---------- Logo, portrait, form states (Module 11 additions) ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand .logo { width: auto; height: 34px; color: var(--ink); flex: none; }
.about-hero.has-photo { grid-template-columns: minmax(0, 1fr) 376px; gap: 32px 64px; align-items: start; }
.about-text { display: grid; gap: 32px; justify-items: start; }
.portrait { margin: 0; border-radius: 20px; overflow: hidden; background: var(--subtle); aspect-ratio: 4 / 5; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.form-note.ok { background: var(--sage-bg); }
.form-note.fail { background: var(--blush); }
.form-note strong { display: block; font-size: 16px; color: var(--ink); }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
@media (max-width: 1100px) { .about-hero.has-photo { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 767px) {
  .brand .logo { height: 28px; }
  .brand { gap: 10px; }
  .about-hero.has-photo { grid-template-columns: 1fr; }
  .portrait { max-width: 72%; }
  .about-text .btn { width: 100%; }
}
