:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #171716;
  --muted: #686865;
  --line: #e8e8e5;
  --soft: #f6f6f4;
  --coffee-ink: #4f311f;
  --coffee-line: #bd956f;
  --coffee-wash: #f1dfca;
  --coffee-soft: #cfaa86;
  --max: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { color: inherit; font: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
::selection { background: #dededb; color: #111; }

:focus-visible {
  outline: 2px solid #555;
  outline-offset: 4px;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 500;
  top: -100px;
  left: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.container {
  width: min(calc(100% - 64px), var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(232, 232, 229, .8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav {
  position: relative;
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 400;
  letter-spacing: .015em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.5vw, 34px);
}
.nav-links a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  color: #444441;
  font-size: .82rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s var(--ease);
}
.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-links a:hover,
.nav-links a.is-active { color: #111; }
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }

.nav-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
}
.install-btn,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 19px;
  border: 1px solid #111;
  border-radius: 999px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .22s var(--ease), background-color .22s var(--ease), color .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.install-btn[hidden] { display: none; }
@media (display-mode: standalone), (display-mode: window-controls-overlay) {
  .install-btn { display: none; }
}
.install-btn,
.button-dark {
  background: #111;
  color: #fff;
}
.install-btn:hover,
.button-dark:hover {
  background: #30302e;
  border-color: #30302e;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .12);
  transform: translateY(-2px);
}
.button-light {
  background: #fff;
  color: #111;
}
.button-light:hover {
  background: #f5f5f3;
  transform: translateY(-2px);
}
.button svg { width: 15px; height: 15px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 14px;
  height: 1px;
  margin: 4px auto;
  background: #171716;
  transition: transform .2s var(--ease), margin .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:first-child { margin-bottom: -1px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { margin-top: 0; transform: rotate(-45deg); }

/* Hero */
.hero { padding: clamp(24px, 2.5vw, 36px) 0 44px; }
.hero-inner { text-align: center; }
.eyebrow {
  margin-bottom: 20px;
  color: #656562;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .025em;
}
.hero h1 {
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(2.75rem, 4.5vw, 4.1rem);
  font-weight: 500;
  letter-spacing: -.068em;
  line-height: .99;
}
.hero h1 em { font-style: normal; }
.hero-copy {
  max-width: 560px;
  margin: 18px auto 0;
  color: #595956;
  font-size: clamp(.96rem, 1.4vw, 1.08rem);
}
.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 21px;
}
.hero-actions .button { min-height: 46px; padding-inline: 21px; }
.hero-image-slot {
  width: min(100%, 720px);
  aspect-ratio: 2.22 / 1;
  min-height: 260px;
  margin: clamp(26px, 3vw, 34px) auto 0;
  overflow: hidden;
  border: 1px solid #eeefec;
  border-radius: clamp(18px, 2vw, 26px);
  background: linear-gradient(135deg, #f8f8f6, #f4f5f3);
}
.hero-image { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Shared section styles */
.section {
  padding-block: clamp(66px, 8.5vw, 104px);
  scroll-margin-top: 82px;
}
.about-section,
.interests-section,
.work-section { border-top: 1px solid var(--coffee-line); }
.section-label {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 4px 11px 4px 4px;
  border: 1px solid var(--coffee-line);
  border-radius: 999px;
  margin-bottom: 18px;
  background: var(--coffee-wash);
  color: var(--coffee-ink);
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.section-label span {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid var(--coffee-line);
  border-radius: 50%;
  background: var(--coffee-soft);
  color: var(--coffee-ink);
  font-size: .58rem;
  letter-spacing: 0;
}
.section h2,
.install-dialog h2 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.08;
}
.section h2 em,
.install-dialog h2 em { font-style: normal; }
.about-grid h2 em { font-style: italic; }
.section-sub {
  margin-top: 12px;
  color: var(--muted);
  font-size: .94rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: start;
  gap: clamp(44px, 9vw, 130px);
}
.section-copy { max-width: 610px; padding-top: 8px; }
.section-copy p { color: #5d5d59; font-size: .96rem; }
.section-copy .lead {
  margin-bottom: 14px;
  color: #22221f;
  font-size: clamp(1.16rem, 2vw, 1.45rem);
  letter-spacing: -.025em;
  line-height: 1.4;
}
.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 23px;
}
.interest-tags li {
  padding: 6px 11px;
  border: 1px solid var(--coffee-line);
  border-radius: 999px;
  background: var(--coffee-wash);
  color: var(--coffee-ink);
  font-size: .72rem;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.interest-tags li:hover { background: var(--coffee-soft); transform: translateY(-2px); }

/* Interests */
.section-heading { max-width: 700px; margin: 0 auto 38px; text-align: center; }
.section-heading .section-label { justify-content: center; margin-inline: auto; }
.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--coffee-line);
  border-left: 1px solid var(--coffee-line);
}
.interest-item {
  position: relative;
  min-height: 150px;
  padding: 24px 26px;
  border-right: 1px solid var(--coffee-line);
  border-bottom: 1px solid var(--coffee-line);
  transition: background-color .25s var(--ease);
}
.interest-item:nth-child(even) { background: var(--coffee-wash); }
.interest-item:hover { background: var(--coffee-soft); }
.interest-index { color: #8a8a85; font-size: .68rem; font-variant-numeric: tabular-nums; }
.interest-item h3 {
  margin-top: 9px;
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: -.025em;
}
.interest-item p { margin-top: 4px; color: var(--muted); font-size: .85rem; }

/* Work table */
.work-section { padding-bottom: clamp(74px, 9vw, 112px); }
.work-panel {
  overflow: hidden;
  border: 1px solid var(--coffee-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 35px rgba(24, 24, 20, .035);
}
.work-table { width: 100%; border-collapse: collapse; text-align: left; }
.work-table th {
  padding: 15px 20px;
  border-bottom: 1px solid var(--coffee-line);
  background: var(--coffee-soft);
  color: var(--coffee-ink);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.work-table th:nth-child(1) { width: 31%; }
.work-table th:nth-child(2) { width: 23%; }
.work-table th:nth-child(3) { width: 25%; }
.work-table th:nth-child(4) { width: 12%; }
.work-table td {
  padding: 17px 20px;
  border-bottom: 1px solid var(--coffee-line);
  color: #666662;
  font-size: .86rem;
  vertical-align: middle;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.work-table tbody tr:nth-child(even) { background: var(--coffee-wash); }
.work-table tbody tr:last-child td { border-bottom: 0; }
.work-table tbody tr:hover td { background: var(--coffee-soft); color: var(--coffee-ink); }
.project-cell { display: flex; align-items: center; gap: 10px; }
.project-cell a,
.project-name {
  color: #1c1c19;
  font-size: .97rem;
  font-weight: 500;
}
.project-cell a {
  text-decoration: none;
}
.project-cell a:hover { text-decoration: underline; text-underline-offset: 4px; }
.project-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #222; }
.dot-iris { background: #73736c; }
.dot-mint { background: #8b9b86; }
.dot-peach { background: #b59480; }
.dot-butter { background: #aaa078; }
.dot-sky { background: #7d9299; }
.dot-rose { background: #9d858c; }
.work-table td:nth-child(4) { font-variant-numeric: tabular-nums; }
.cell-arrow { text-align: right; }
.row-arrow {
  display: inline-grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid #e7e7e4;
  border-radius: 50%;
  color: #444;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.row-arrow svg { width: 14px; height: 14px; }
.row-arrow:hover { background: #171716; color: #fff; transform: translate(2px, -2px); }

/* Contact at the end of the page */
.contact-section { padding-top: 20px; }
.contact-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(36px, 6vw, 72px) clamp(22px, 6vw, 80px);
  border: 1px solid #ececea;
  border-radius: 22px;
  background: #f8f8f6;
  text-align: center;
}
.contact-panel .section-label { justify-content: center; margin-inline: auto; }
.contact-panel h2 { margin-top: 1px; }
.contact-copy { max-width: 530px; margin-top: 13px; color: #62625e; font-size: .93rem; }
.email-link {
  margin-top: 23px;
  color: #191917;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -.03em;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.user-info-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 550px);
  min-height: 70px;
  margin-top: 31px;
  padding: 10px 13px;
  border: 1px solid var(--coffee-line);
  border-radius: 14px;
  background: var(--coffee-wash);
  text-align: left;
}
.user-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--coffee-soft);
  color: var(--coffee-ink);
  font-family: Georgia, serif;
  font-size: .83rem;
}
.user-details { display: flex; flex: 1; flex-direction: column; line-height: 1.35; }
.user-details strong { font-size: .83rem; font-weight: 600; }
.user-details small { margin-top: 3px; color: #777772; font-size: .7rem; }
.info-email { color: #333; font-size: .75rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.info-email:hover { text-decoration: underline; text-underline-offset: 3px; }
.copy-email { padding: 6px 8px; border: 0; border-radius: 7px; background: #f3f3f1; color: #444; cursor: pointer; font-size: .68rem; }
.copy-email:hover { background: #e9e9e6; }
.social-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 22px; }
.social-links a { color: #6c6c67; font-size: .76rem; text-decoration: none; }
.social-links a:hover { color: #111; }

.site-footer { padding: 25px 0; border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  color: #777772;
  font-size: .72rem;
}
.footer-inner a { color: #555550; text-decoration: none; }
.footer-inner a:hover { color: #111; }

/* Download/install prompt */
.install-dialog {
  position: relative;
  width: min(420px, calc(100% - 32px));
  padding: 34px;
  border: 1px solid #e5e5e2;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .2);
}
.install-dialog::backdrop { background: rgba(14, 14, 12, .38); backdrop-filter: blur(3px); }
.install-dialog h2 { font-size: 1.8rem; }
.install-dialog > p:not(.section-label) { margin: 12px 0 21px; color: #61615d; font-size: .9rem; }
.install-dialog .section-label { margin-bottom: 12px; }
.dialog-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}
.dialog-close:hover { background: #f2f2ef; }
.toast {
  position: fixed;
  z-index: 300;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100% - 40px));
  padding: 12px 16px;
  border: 1px solid #e5e5e2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .12);
  color: #30302d;
  font-size: .8rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Entrance motion stays quiet and respects reduced-motion preferences. */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .65s var(--ease), transform .65s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 850px) {
  .container { width: min(calc(100% - 40px), var(--max)); }
  .nav { min-height: 72px; grid-template-columns: 1fr auto; gap: 12px; }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    z-index: 120;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 9px;
    border: 1px solid #e8e8e5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-7px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s var(--ease);
    visibility: hidden;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: none; visibility: visible; }
  .nav-links a { padding: 11px 12px; border-radius: 9px; font-size: .9rem; }
  .nav-links a:hover { background: #f6f6f4; }
  .nav-links a::after { display: none; }
  .nav-actions { gap: 8px; }
  .nav-toggle { display: block; }
  .hero { padding-top: 50px; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 32px), var(--max)); }
  .nav { min-height: 68px; }
  .brand { font-size: 1.03rem; }
  .install-btn { min-height: 39px; padding-inline: 12px; font-size: .68rem; }
  .nav-toggle { width: 38px; height: 38px; }
  .hero { padding: 59px 0 44px; }
  .eyebrow { margin-bottom: 16px; font-size: .7rem; }
  .hero h1 { font-size: clamp(2.7rem, 12vw, 4.15rem); }
  .hero-copy { max-width: 390px; margin-top: 17px; font-size: .91rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 22px; }
  .hero-actions .button { min-height: 43px; padding-inline: 10px; font-size: .74rem; }
  .hero-image-slot { min-height: 205px; aspect-ratio: 1.32 / 1; margin-top: 32px; border-radius: 17px; }
  .section { padding-block: 62px; }
  .section-heading { margin-bottom: 27px; }
  .interest-grid { grid-template-columns: 1fr; }
  .interest-item { min-height: 0; padding: 20px; }
  .work-panel { border-radius: 13px; }
  .work-table,
  .work-table tbody,
  .work-table tr,
  .work-table td { display: block; width: 100%; }
  .work-table thead { display: none; }
  .work-table tbody tr { position: relative; padding: 15px 17px; border-bottom: 1px solid var(--coffee-line); }
  .work-table tbody tr:last-child { border-bottom: 0; }
  .work-table td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 4px 0; border: 0; font-size: .78rem; }
  .work-table td[data-label]::before { color: #858580; content: attr(data-label); font-size: .62rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .work-table td.project-cell { justify-content: flex-start; padding: 0 38px 7px 0; font-size: .98rem; }
  .work-table td.project-cell::before { display: none; }
  .work-table td.cell-arrow { position: absolute; top: 14px; right: 14px; width: auto; padding: 0; }
  .work-table td.cell-arrow::before { display: none; }
  .row-arrow { width: 29px; height: 29px; }
  .contact-section { padding-top: 0; }
  .contact-panel { padding: 36px 18px 30px; border-radius: 18px; }
  .user-info-bar { gap: 8px; padding-inline: 9px; }
  .user-mark { width: 36px; height: 36px; font-size: .75rem; }
  .user-details strong { font-size: .76rem; }
  .user-details small { font-size: .63rem; }
  .info-email { font-size: .68rem; }
  .copy-email { padding: 6px; font-size: .63rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
}

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