/* Elizabeth Ignatus — classic portfolio
   Warm ivory paper, black ink, hairline rules, one muted bronze accent.
   Type: Cormorant Garamond (display) + Lato (text). */

:root {
  --paper: #faf8f4;
  --white: #ffffff;
  --ink: #1a1a1a;
  --soft: #4a4742;
  --muted: #7a756c;
  --rule: #d9d3c7;
  --accent: #8a6a3d;
  --dark: #151412;

  --display: "Cormorant Garamond", "Garamond", Georgia, serif;
  --sans: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.75; color: var(--soft); background: var(--paper); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--ink); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .5em; font-weight: 500; color: var(--ink); text-wrap: balance; }
h2 { font-family: var(--display); font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.1; }
h3 { font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.25; }
p { margin: 0 0 1em; max-width: 62ch; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: #fff; padding: .7rem 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section { padding-block: clamp(4.5rem, 9vw, 7rem); border-top: 1px solid var(--rule); }
.lead { font-size: 1.15rem; color: var(--soft); }

/* Small-caps label used for eyebrows and meta */
.role, .facts dt, .profile dt, .more, .when, .net, .tabs [role="tab"], .field label, .top nav a, .foot {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700;
}

.btn {
  display: inline-flex; align-items: center; gap: .6rem; font: 700 .8rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  padding: 1.05rem 1.7rem; border: 1px solid var(--ink); background: var(--ink); color: #fff; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn svg { width: 1.05em; height: 1.05em; }

/* Header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 2rem; height: 72px; }
.wordmark { font-family: var(--display); font-size: 1.65rem; font-weight: 600; letter-spacing: .02em; color: var(--ink); text-decoration: none; margin-right: auto; }
.top nav { display: flex; gap: 2rem; }
.top nav a { color: var(--soft); text-decoration: none; padding: .5rem 0; border-bottom: 1px solid transparent; }
.top nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.top .btn { padding: .8rem 1.25rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--ink); font: 700 .78rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: .75rem 1rem; color: var(--ink); cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .top .btn { display: none; }
  .top nav { position: fixed; inset: 72px 0 auto; flex-direction: column; gap: 0; background: var(--paper); padding: .5rem var(--gutter) 1.25rem; border-bottom: 1px solid var(--rule); display: none; }
  .top nav a { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
  .top nav.is-open { display: flex; }
}

/* Hero */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem) 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center; }
.role { color: var(--accent); margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; }
.role::before { content: ""; width: 2.5rem; height: 1px; background: var(--accent); }
.hero h1 { font-family: var(--display); font-weight: 500; font-size: clamp(3.6rem, 8.5vw, 7rem); line-height: .95; letter-spacing: -.01em; margin-bottom: 1.75rem; }
.hero h1 span { display: block; }
.hero h1 span:last-child { font-style: italic; padding-left: .6em; }
.hero .lead { font-family: var(--display); font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.45; color: var(--soft); max-width: 34em; }
.ecg { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.portrait { margin: 0; position: relative; padding: 0 1.25rem 1.25rem 0; }
.portrait::before { content: ""; position: absolute; inset: 1.25rem 0 0 1.25rem; border: 1px solid var(--accent); z-index: 0; }
.portrait img { position: relative; z-index: 1; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; filter: grayscale(.15); }
.portrait figcaption { position: relative; z-index: 1; margin-top: 1rem; font-size: .9rem; color: var(--muted); font-style: italic; max-width: 34ch; }
.portrait figcaption strong { display: block; font-style: normal; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); margin-bottom: .15rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .portrait { max-width: 440px; } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(3rem, 6vw, 5rem) 0 0; border-top: 1px solid var(--rule); }
.facts div { padding: 1.75rem 1.25rem 1.75rem 0; }
.facts div + div { padding-left: 1.5rem; border-left: 1px solid var(--rule); }
.facts dt { color: var(--muted); margin-bottom: .35rem; }
.facts dd { margin: 0; font-family: var(--display); font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.1; color: var(--ink); }
@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

/* Section heads */
.head { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 4rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.head h2, .head p { margin: 0; }
@media (max-width: 760px) { .head { grid-template-columns: 1fr; } }

/* Services — numbered index */
.service-grid { list-style: none; margin: 0; padding: 0; counter-reset: svc; border-top: 1px solid var(--ink); }
.service-grid li { counter-increment: svc; border-bottom: 1px solid var(--rule); }
.service-grid a { display: grid; grid-template-columns: 4rem 1fr 1.2fr auto; gap: 1.5rem; align-items: baseline; padding: 1.75rem 0; text-decoration: none; color: inherit; transition: padding-left .25s, background-color .25s; }
.service-grid a::before { content: counter(svc, decimal-leading-zero); font-family: var(--display); font-size: 1.5rem; color: var(--accent); }
.service-grid a:hover { padding-left: .75rem; background: var(--white); }
.service-grid h3 { margin: 0; font-size: 1.7rem; }
.service-grid p { margin: 0; font-size: 1rem; }
.ic { display: none; }
.more { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); white-space: nowrap; }
.more svg { width: 1.1em; height: 1.1em; transition: transform .2s; }
.service-grid a:hover .more svg { transform: translateX(4px); }
@media (max-width: 860px) {
  .service-grid a { grid-template-columns: 3rem 1fr; }
  .service-grid p, .service-grid .more { grid-column: 2; }
}

/* About */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2.5rem, 6vw, 5.5rem); align-items: start; }
.about-photo { position: sticky; top: 100px; padding: 0 0 1.25rem 1.25rem; }
.about-photo::before { content: ""; position: absolute; inset: 1.25rem 1.25rem 0 0; border: 1px solid var(--accent); }
.about-photo img { position: relative; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-photo { position: static; max-width: 420px; } }

.tabs [role="tablist"] { display: flex; flex-wrap: wrap; gap: 1.75rem; border-bottom: 1px solid var(--rule); margin: 2rem 0 2rem; }
.tabs [role="tab"] { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: .75rem 0; color: var(--muted); cursor: pointer; }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs [role="tabpanel"] { min-height: 12rem; }
.resume { margin-top: 2rem; }

.profile { margin: 0; }
.profile div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--rule); }
.profile dt { color: var(--muted); padding-top: .2rem; }
.profile dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 520px) { .profile div { grid-template-columns: 1fr; gap: .15rem; } }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 10rem 1fr; gap: 1.5rem; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); }
.timeline .when { color: var(--accent); padding-top: .45rem; }
.timeline h3 { margin: 0 0 .1rem; font-size: 1.35rem; }
.timeline p { margin: 0; color: var(--muted); }
@media (max-width: 520px) { .timeline li { grid-template-columns: 1fr; gap: .2rem; } }

.skills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.skills li { padding: .5rem 1rem; border: 1px solid var(--rule); background: var(--white); font-size: .95rem; color: var(--ink); }

/* Reviews */
.reviews { background: var(--white); }
.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem 4rem; }
.review { margin: 0; }
.review blockquote { margin: 0; }
.review blockquote p { font-family: var(--display); font-style: italic; font-size: 1.4rem; line-height: 1.5; color: var(--ink); max-width: none; }
.review blockquote p::before { content: "\201C"; display: block; font-size: 4rem; line-height: .6; color: var(--accent); margin-bottom: .5rem; }
.review--lead { grid-column: 1 / -1; text-align: center; max-width: 52rem; margin-inline: auto; padding-bottom: 1rem; border-bottom: 1px solid var(--rule); }
.review--lead blockquote p { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-inline: auto; }
.review figcaption { display: flex; align-items: center; gap: .9rem; margin-top: 1.25rem; }
.review--lead figcaption { justify-content: center; }
.avatar { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--accent); display: grid; place-items: center; font-size: .78rem; letter-spacing: .08em; color: var(--accent); font-weight: 700; }
.review cite { display: block; font-style: normal; font-weight: 700; color: var(--ink); line-height: 1.3; }
.review small { color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) { .review-grid { grid-template-columns: 1fr; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 6vw, 5.5rem); }
.socials { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--rule); }
.socials a { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; flex-wrap: wrap; }
.net { color: var(--accent); }
.handle { color: var(--ink); overflow-wrap: anywhere; }
.socials a:hover .handle { color: var(--accent); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form { background: var(--white); border: 1px solid var(--rule); padding: clamp(1.5rem, 3vw, 2.5rem); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.4rem; }
.field label { display: block; margin-bottom: .4rem; color: var(--ink); }
.field label .opt { font-weight: 400; color: var(--muted); letter-spacing: .04em; text-transform: none; font-size: .85rem; }
.field input, .field textarea { width: 100%; font: inherit; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: .6rem 0; transition: border-color .15s; }
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.field .error { color: #a12b1d; font-size: .88rem; margin: .35rem 0 0; }
.field.has-error input, .field.has-error textarea { border-bottom-color: #a12b1d; }
.hp { position: absolute; left: -5000px; }
.notice { padding: 1rem 1.15rem; margin-bottom: 1.5rem; font-size: .95rem; border-left: 3px solid; }
.notice--ok { background: #f1f5ee; color: #2f4a26; border-color: #5d8a4a; }
.notice--err { background: #faeeeb; color: #7a2418; border-color: #a12b1d; }

/* Footer */
.foot { background: var(--dark); color: #b9b3a8; padding-block: 2rem; }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.foot a { color: #fff; text-decoration: none; border-bottom: 1px solid var(--accent); }
.foot a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Refinements */
body, .facts dd, .service-grid a::before { font-variant-numeric: lining-nums; }
.portrait { padding: 0; }
.portrait::before { display: none; }
.portrait img { background: linear-gradient(#efe9dd, #e4dccb); border: 1px solid var(--rule); outline: 1px solid var(--accent); outline-offset: 10px; margin: 10px; width: calc(100% - 20px); }
.portrait figcaption { margin: 1.5rem 10px 0; }
.about-photo { padding: 0; }
.about-photo::before { display: none; }
.about-photo img { background: linear-gradient(#efe9dd, #e4dccb); outline: 1px solid var(--accent); outline-offset: 10px; margin: 10px; width: calc(100% - 20px); }
.service-grid a { grid-template-columns: 4rem 1fr 1.2fr 8rem; }
.service-grid .more { justify-content: flex-end; }
@media (max-width: 860px) { .service-grid a { grid-template-columns: 3rem 1fr; } }
.socials a { align-items: baseline; }

/* Theme toggle + dark theme */
.theme-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; transition: border-color .2s, color .2s; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] {
  --paper: #141311; --white: #1c1a17; --ink: #f1ece2; --soft: #c4bdb0; --muted: #968f82; --rule: #34302a; --accent: #c9a56b; --dark: #0b0a09;
  color-scheme: dark;
}
:root[data-theme="dark"] .btn { background: var(--ink); color: #141311; border-color: var(--ink); }
:root[data-theme="dark"] .btn:hover { background: transparent; color: var(--ink); }
:root[data-theme="dark"] .btn--line { background: transparent; color: var(--ink); }
:root[data-theme="dark"] .btn--line:hover { background: var(--ink); color: #141311; }
:root[data-theme="dark"] .portrait img, :root[data-theme="dark"] .about-photo img { filter: none; }
:root[data-theme="dark"] .top nav a:hover { color: var(--ink); }
@media (max-width: 860px) { .top .theme-toggle { order: 3; } }
