:root {
  --bg: #282828;
  --surface: #282828;
  --text: #e7e5e1;
  --muted: #8a8986;
  --accent: #c9653e;
  --line: rgba(255,255,255,.1);
  --pad: clamp(1.25rem, 4vw, 4.75rem);
  --header-height: 84px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #111; }

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link { position: fixed; z-index: 100; top: 1rem; left: 1rem; padding: .75rem 1rem; background: var(--accent); color: #111; }

.site-header {
  min-height: var(--header-height);
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.brand { display: inline-flex; width: max-content; text-decoration: none; }
.brand-logo { display: block; width: clamp(170px, 16vw, 235px); height: auto; }
.site-nav { grid-column: 2; display: flex; align-items: center; justify-content: center; gap: clamp(1.2rem, 2.2vw, 2.5rem); }
.site-nav a {
  position: relative;
  padding: .8rem 0;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 550;
  transition: color .25s ease;
}
.site-nav a::before {
  content: "";
  position: absolute;
  top: .05rem;
  left: 50%;
  width: 4px;
  height: 4px;
  background: var(--accent);
  opacity: 0;
  transform: translate(-50%, 5px) rotate(45deg);
  transition: opacity .25s ease, transform .25s ease;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav a:hover::before, .site-nav a:focus-visible::before, .site-nav a[aria-current="page"]::before { opacity: 1; transform: translate(-50%, 0) rotate(45deg); }
.menu-toggle { display: none; }

.gallery-page { display: flex; width: 100%; height: 100svh; min-height: 0; flex-direction: column; overflow: hidden; }
.gallery-page .site-header, .gallery-page .site-footer { flex-shrink: 0; }
.gallery-shell {
  width: 100%;
  max-width: none;
  margin: auto;
  flex: 1;
  min-height: 0;
  display: block;
  padding: clamp(.75rem, 1.8vh, 1.25rem) var(--pad) .25rem;
}
.eyebrow { margin: 0; color: var(--accent); text-transform: uppercase; letter-spacing: .2em; font-size: .61rem; font-weight: 700; line-height: 1.7; }
.gallery-viewer { width: 100%; height: 100%; min-width: 0; min-height: 0; display: grid; grid-template: minmax(0, 1fr) auto / 1fr; position: relative; }
.gallery-stage {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
}
.gallery-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s cubic-bezier(.22,.61,.36,1), visibility 0s linear .8s;
}
.gallery-slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition-delay: 0s; }
.gallery-slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.gallery-arrow {
  position: absolute;
  z-index: 5;
  top: calc(50% - 2rem);
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(8,8,8,.55);
  color: white;
  cursor: pointer;
  opacity: .65;
  transition: background .25s ease, color .25s ease, opacity .25s ease;
}
.gallery-prev { left: 1.25rem; }
.gallery-next { right: 1.25rem; }
.gallery-arrow:hover, .gallery-arrow:focus-visible { background: rgba(8,8,8,.9); color: var(--accent); opacity: 1; }
.gallery-arrow:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.gallery-controls { min-height: 36px; display: flex; justify-content: center; align-items: center; }
.slide-number { display: flex; align-items: center; gap: .55rem; color: var(--text); font-size: .76rem; letter-spacing: .12em; }
.slide-number .divider, .slide-number span:last-child { color: var(--muted); }
.gallery-status { min-height: 55vh; display: flex; justify-content: center; align-items: center; gap: .8rem; color: var(--muted); }
.gallery-status.is-error { flex-direction: column; }
.gallery-status button { border: 0; border-bottom: 1px solid currentColor; padding: .3rem 0; background: transparent; color: var(--text); cursor: pointer; }
.loader { width: .85rem; height: .85rem; border: 1px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.site-footer {
  min-height: 48px;
  padding: .8rem var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .65rem;
}

.info-shell { overflow: hidden; padding: clamp(3rem, 8vw, 8rem) var(--pad); }
.intro-grid { width: min(1400px, 100%); margin: auto; display: grid; grid-template-columns: minmax(280px, .8fr) 1.2fr; gap: clamp(3rem, 9vw, 10rem); align-items: center; }
.portrait-wrap { position: relative; }
.portrait-wrap::before { content: ""; position: absolute; inset: -1.2rem 1.2rem 1.2rem -1.2rem; border: 1px solid var(--accent); z-index: -1; }
.portrait-wrap img { display: block; width: 100%; height: auto; filter: grayscale(1) contrast(1.06); }
.intro-copy h1 { max-width: 10ch; margin: .8rem 0 1.8rem; font-size: clamp(3rem, 6vw, 6.5rem); line-height: .92; letter-spacing: -.055em; font-weight: 360; }
.lede { max-width: 55ch; color: #b0aea8; font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.8; }
.contact-link { display: inline-flex; gap: 1.5rem; margin-top: 1.2rem; padding: .85rem 0; border-bottom: 1px solid var(--accent); color: var(--text); text-decoration: none; text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; font-weight: 650; }
.info-grid { width: min(1400px, 100%); margin: clamp(6rem, 14vw, 13rem) auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6rem clamp(3rem, 9vw, 10rem); }
.info-grid article { border-top: 1px solid var(--line); padding-top: 1.2rem; }
.info-grid article.clients { grid-column: 1 / -1; }
.section-number { margin: 0; color: var(--accent); font-size: .62rem; letter-spacing: .18em; }
.info-grid h2 { margin: 1.5rem 0 1.2rem; font-size: clamp(2rem, 4vw, 4.5rem); letter-spacing: -.05em; font-weight: 390; }
.info-grid article > p:last-of-type { color: #aaa8a2; font-size: 1.06rem; line-height: 1.85; }
.text-link { display: inline-block; margin-top: 1rem; text-underline-offset: .3em; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.timeline span { color: var(--muted); font-size: .8rem; }
.clients p:last-child { max-width: 1000px; font-size: clamp(1rem, 1.7vw, 1.3rem); }

.about-layout { width: min(1280px, calc(100% - (2 * var(--pad)))); margin: clamp(2rem, 4vw, 4rem) auto; display: grid; grid-template-columns: 320px minmax(0, 1fr); border: 1px solid var(--line); }
.identity-panel { padding: 1.5rem; background: #202020; border-right: 1px solid var(--line); }
.identity-panel img { display: block; width: 100%; height: auto; margin-bottom: 2rem; }
.identity-panel h1 { margin: .5rem 0 1.25rem; font-size: clamp(3rem, 5vw, 5.2rem); line-height: .82; letter-spacing: -.065em; font-weight: 400; }
.identity-panel > p:not(.eyebrow) { max-width: 24ch; color: #b6b4b0; line-height: 1.65; }
.identity-panel dl { margin: 2rem 0 0; }
.identity-panel dl div { display: grid; grid-template-columns: 5rem 1fr; padding: .75rem 0; border-top: 1px solid var(--line); }
.identity-panel dt { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-size: .6rem; }
.identity-panel dd { margin: 0; font-size: .78rem; }
.resume-panel { padding: clamp(2rem, 4vw, 4rem); }
.resume-heading { display: flex; justify-content: space-between; align-items: start; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.resume-heading h2 { max-width: 10ch; margin: 0; font-size: clamp(2.4rem, 5vw, 5rem); line-height: .9; letter-spacing: -.055em; font-weight: 400; }
.resume-topline { display: grid; grid-template-columns: 1.4fr .6fr; }
.resume-section { padding: 2rem 0; }
.resume-section h3 { margin: 0 0 1.5rem; color: var(--accent); text-transform: uppercase; letter-spacing: .13em; font-size: .7rem; }
.experience-section { padding-right: clamp(2rem, 4vw, 4rem); border-right: 1px solid var(--line); }
.education-section { padding-left: clamp(2rem, 4vw, 4rem); }
.resume-list, .award-list { margin: 0; padding: 0; list-style: none; }
.resume-list li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.resume-list time, .award-list > li > span { color: var(--muted); font-size: .72rem; }
.resume-list p, .award-list p { margin: 0; line-height: 1.45; }
.resume-list p span { color: var(--muted); font-size: .82rem; }
.education-section .degree { margin: 0 0 1.25rem; font-size: 1.35rem; line-height: 1.25; }
.education-section > p:last-child { color: var(--muted); }
.awards-section { border-top: 1px solid var(--line); }
.award-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
.award-list li { display: grid; grid-template-columns: 3.25rem 1fr; gap: .75rem; padding: .65rem 0; border-top: 1px solid var(--line); }
.award-winning { color: var(--text); }
.award-winning > span, .award-winning strong { color: var(--accent); }
.award-credit { margin: 1.5rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }

.error-page { display: grid; place-items: center; padding: 2rem; }
.error-page main { max-width: 700px; text-align: center; }
.error-page h1 { margin: .5rem 0 1rem; font-size: clamp(3rem, 9vw, 7rem); letter-spacing: -.06em; font-weight: 420; }
.error-page p:not(.eyebrow) { color: var(--muted); }

@media (max-width: 1100px) {
  .site-header { grid-template-columns: 1fr auto; padding-inline: var(--pad); }
  .brand { grid-column: 1; min-width: 0; max-width: 100%; }
  .brand-logo { max-width: 100%; }
  .menu-toggle { grid-column: 2; justify-self: end; display: grid; gap: 6px; width: 42px; height: 42px; place-content: center; border: 0; background: transparent; color: white; cursor: pointer; }
  .menu-toggle span:not(.sr-only) { display: block; width: 21px; height: 1px; background: currentColor; transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] span:nth-last-child(2) { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .site-nav { grid-column: auto; display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 2rem var(--pad) 2.4rem; flex-direction: column; align-items: flex-start; gap: .7rem; background: var(--bg); border-top: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding-left: .8rem; font-size: .86rem; }
  .site-nav a::before { top: 50%; left: 0; transform: translate(5px, -50%) rotate(45deg); }
  .site-nav a:hover::before, .site-nav a:focus-visible::before, .site-nav a[aria-current="page"]::before { transform: translate(0, -50%) rotate(45deg); }
}

@media (max-width: 760px) {
  :root { --header-height: 74px; --pad: 1rem; }
  .site-header { grid-template-columns: 1fr auto; padding-inline: var(--pad); }
  .menu-toggle { display: grid; gap: 6px; width: 42px; height: 42px; place-content: center; border: 0; background: transparent; color: white; cursor: pointer; }
  .menu-toggle span:not(.sr-only) { display: block; width: 21px; height: 1px; background: currentColor; transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] span:nth-last-child(2) { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 2rem var(--pad) 2.4rem; flex-direction: column; align-items: flex-start; gap: .7rem; background: var(--bg); border-top: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding-left: .8rem; font-size: .86rem; }
  .site-nav a::before { top: 50%; left: 0; transform: translate(5px, -50%) rotate(45deg); }
  .site-nav a:hover::before, .site-nav a:focus-visible::before, .site-nav a[aria-current="page"]::before { transform: translate(0, -50%) rotate(45deg); }
  .gallery-shell { padding: .5rem var(--pad) .15rem; }
  .gallery-arrow { top: calc(50% - 1.4rem); width: 2.8rem; height: 2.8rem; }
  .gallery-prev { left: .65rem; }
  .gallery-next { right: .65rem; }
  .gallery-controls { min-height: 32px; }
  .site-footer { gap: 1rem; }
  .intro-grid { grid-template-columns: 1fr; }
  .portrait-wrap { width: min(80vw, 430px); margin-left: .9rem; }
  .intro-copy h1 { font-size: clamp(3.5rem, 19vw, 6rem); }
  .info-grid { grid-template-columns: 1fr; margin-top: 7rem; gap: 4.5rem; }
  .info-grid article.clients { grid-column: auto; }
  .timeline li { grid-template-columns: 6.25rem 1fr; }
  .about-layout { width: calc(100% - 2rem); margin: 1.5rem auto 3rem; grid-template-columns: 1fr; }
  .identity-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .identity-panel img { width: min(66vw, 300px); }
  .identity-panel h1 { font-size: clamp(3.5rem, 18vw, 5.5rem); }
  .resume-panel { padding: 1.5rem; }
  .resume-heading { display: block; }
  .resume-heading .section-number { margin-bottom: 1rem; }
  .resume-heading h2 { font-size: clamp(2.5rem, 13vw, 4.5rem); }
  .resume-topline { grid-template-columns: 1fr; }
  .experience-section { padding-right: 0; border-right: 0; }
  .education-section { padding-left: 0; border-top: 1px solid var(--line); }
  .award-list { grid-template-columns: 1fr; }
  .resume-list li { grid-template-columns: 6rem 1fr; }
}

.awards { max-width: 1000px; }

@media (max-height: 650px) and (min-width: 761px) {
  :root { --header-height: 76px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .gallery-page .site-header { min-height: 52px; }
  .gallery-page .brand-logo { width: 145px; }
  .gallery-page .menu-toggle { width: 36px; height: 36px; }
  .gallery-page .site-nav {
    max-height: calc(100svh - 52px);
    padding: .65rem var(--pad) .85rem;
    gap: .15rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .gallery-page .site-nav a { padding-block: .45rem; }
  .gallery-page .gallery-shell { padding: 4px .65rem 0; }
  .gallery-page .gallery-controls { min-height: 24px; }
  .gallery-page .slide-number { font-size: .66rem; }
  .gallery-page .site-footer { display: none; }
  .gallery-page .gallery-arrow { top: calc(50% - 1.25rem); width: 2.5rem; height: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
