/* =========================================================
   DESIGN TOKENS — minimal warm-white, big bold sans
   ========================================================= */
:root {
  --paper:        #faf8f3;
  --paper-deep:   #f0ece2;
  --ink:          #181614;
  --ink-soft:     #5b554d;
  --ink-faint:    #9a9389;
  --ink-line:     rgba(24, 22, 20, 0.10);
  --accent:       #1f3a8a;        /* deep ink-blue, used only on links/CTA */

  --font-sans:    "Geist", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --max-w:        1080px;
  --gutter-x:     clamp(20px, 5vw, 56px);
  --section-y:    clamp(80px, 12vh, 140px);

  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--ink);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }

::selection { background: var(--ink); color: var(--paper); }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 1em;
  line-height: 1;
  vertical-align: -0.12em;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gutter-x);
  background: rgba(250, 248, 243, 0.85);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.is-stuck { border-bottom-color: var(--ink-line); }

.nav__brand {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--ink);
}

.nav__links {
  display: flex;
  gap: clamp(14px, 2.5vw, 32px);
  font-size: 14px;
}
.nav__links a {
  color: var(--ink-soft);
  position: relative;
  padding: 4px 2px;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); }

.nav__lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(24, 22, 20, 0.06);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.lang-btn {
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  transition: color 0.2s, background 0.2s;
}
.lang-btn.is-active { color: var(--paper); background: var(--ink); }
.lang-sep { color: var(--ink-faint); }

@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* =========================================================
   LAYOUT WRAPPERS
   ========================================================= */
main { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter-x); }

.section { padding: var(--section-y) 0; border-top: 1px solid var(--ink-line); }
.section:first-of-type { border-top: 0; }

.section__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 56px;
}
.section__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin: 0;
}
.section__title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}
.section__years {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  margin: 0;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  padding: clamp(80px, 14vh, 160px) 0 clamp(80px, 12vh, 140px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin: 0 0 36px;
  background: rgba(255, 255, 255, 0.4);
}
.badge .material-symbols-outlined { font-size: 14px; color: var(--accent); }

.hero__title {
  font-weight: 700;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 28px;
  max-width: 18ch;
  color: var(--ink);
}

.hero__sub {
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 44px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: background 0.2s, transform 0.4s var(--ease-out);
}
.cta:hover { background: var(--accent); }
.cta .material-symbols-outlined { font-size: 18px; transition: transform 0.4s var(--ease-out); }
.cta:hover .material-symbols-outlined { transform: translate(3px, -3px); }

/* =========================================================
   WORKS — vertical list
   ========================================================= */
.works { display: flex; flex-direction: column; }

.work + .work { border-top: 1px solid var(--ink-line); }

.work__row {
  display: grid;
  grid-template-columns: 110px 180px 1fr 60px 24px;
  gap: 24px;
  align-items: center;
  padding: 24px 8px;
  position: relative;
  transition: padding-left 0.4s var(--ease-out), background 0.3s ease;
}
.work__row:hover {
  padding-left: 18px;
  background: rgba(24, 22, 20, 0.02);
}

.work__status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}
.work__status--shipped { background: var(--ink); color: var(--paper); }
.work__status--locked  { background: transparent; color: var(--ink-faint); border: 1px solid var(--ink-line); }
.work__status--locked .material-symbols-outlined { font-size: 12px; }

.work__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.work__desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.work__year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  text-align: right;
}

.work__arrow {
  font-size: 20px !important;
  color: var(--ink-faint);
  transition: transform 0.4s var(--ease-out), color 0.2s;
}
.work__row:hover .work__arrow {
  transform: translate(4px, -4px);
  color: var(--ink);
}

@media (max-width: 880px) {
  .work__row {
    grid-template-columns: 100px 1fr auto;
    grid-template-areas:
      "status title  arrow"
      "status desc   year";
    row-gap: 8px;
    padding: 28px 8px;
  }
  .work__status { grid-area: status; align-self: start; }
  .work__title  { grid-area: title; }
  .work__desc   { grid-area: desc; }
  .work__year   { grid-area: year; text-align: right; align-self: end; }
  .work__arrow  { grid-area: arrow; align-self: start; }
  .work__row:hover { padding-left: 14px; }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.about__text p {
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 18px;
  color: var(--ink);
}
.about__text p:last-child { margin-bottom: 0; color: var(--ink-soft); }

.about__photo {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.about__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
}
.about__photo figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  text-align: right;
}

@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; }
  .about__photo { max-width: 280px; }
}

/* =========================================================
   EXPERIENCE — timeline rows
   ========================================================= */
.exp { display: flex; flex-direction: column; }
.exp__row {
  display: grid;
  grid-template-columns: 160px 200px 200px 1fr;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid var(--ink-line);
}
.exp__row:first-child { border-top: 0; padding-top: 0; }

.exp__when {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.exp__role { font-size: 16px; font-weight: 500; color: var(--ink); }
.exp__co   { font-size: 16px; color: var(--ink); }
.exp__note { font-size: 14px; color: var(--ink-soft); }

@media (max-width: 880px) {
  .exp__row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 22px 0;
  }
  .exp__when { order: -1; margin-bottom: 4px; }
}

/* =========================================================
   SKILLS — pills
   ========================================================= */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pills li {
  padding: 10px 18px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.pills li:hover {
  border-color: var(--ink);
  background: rgba(24, 22, 20, 0.04);
}

/* =========================================================
   NOTES — 3 cards
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 24px 64px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--ink-line);
  border-radius: 12px;
  min-height: 220px;
  transition: transform 0.4s var(--ease-out), border-color 0.2s, background 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
}
.card__price {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin: 0;
}
.card__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.card__desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}
.card__arrow {
  position: absolute;
  bottom: 22px; right: 22px;
  font-size: 22px !important;
  color: var(--ink-faint);
  transition: transform 0.4s var(--ease-out), color 0.2s;
}
.card:hover .card__arrow { transform: translate(3px, -3px); color: var(--ink); }

@media (max-width: 880px) {
  .cards { grid-template-columns: 1fr; }
}

/* =========================================================
   CONTACT inline
   ========================================================= */
.section--contact {
  text-align: left;
  padding-bottom: clamp(120px, 16vh, 180px);
}
.contact__title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 32px;
  max-width: 18ch;
  color: var(--ink);
}
.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: color 0.2s, border-color 0.2s;
}
.contact__email:hover { color: var(--ink); border-bottom-color: var(--ink); }
.contact__email .material-symbols-outlined {
  font-size: 18px;
  transition: transform 0.4s var(--ease-out);
}
.contact__email:hover .material-symbols-outlined { transform: translate(3px, -3px); }

/* =========================================================
   FOOTER — inverted dark
   ========================================================= */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(48px, 8vh, 80px) 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.foot__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter-x);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}
.foot__line { margin: 0; color: rgba(250, 248, 243, 0.65); }
.foot__line a { color: var(--paper); border-bottom: 1px solid rgba(250, 248, 243, 0.3); transition: border-color 0.2s; }
.foot__line a:hover { border-bottom-color: var(--paper); }
.foot__sig { font-style: italic; }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  left: 50%; bottom: 32px;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out);
  pointer-events: none;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.3);
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   MOTION SAFETY
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.05s !important;
  }
}
