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

/* ===== THEME VARIABLES ===== */
:root {
  --bg:       #F4F2ED;
  --fg:       #0B0B09;
  --off:      #55554F;
  --mid:      #888882;
  --rule:     #D4D1C9;
  --card:     #ECEAE5;
  --nav-bg:   rgba(244,242,237,0.88);
  --blue:     #1A4DC7;
  --red:      #C42B20;
  --yellow:   #9E7200;
  --green:    #1A6B35;
  --font:     'DM Sans', sans-serif;
  --serif:    'EB Garamond', serif;
  --radius:   14px;
}

:root.dark {
  --bg:       #0B0B0B;
  --fg:       #F0EEE9;
  --off:      #888885;
  --mid:      #555552;
  --rule:     #1E1E1E;
  --card:     #131313;
  --nav-bg:   rgba(11,11,11,0.88);
  --blue:     #5B8EF0;
  --red:      #E8655A;
  --yellow:   #D4A847;
  --green:    #4CAF70;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
}

*, *::before, *::after {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

a { text-decoration: none; color: inherit; }
em { font-style: italic; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 60px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}

.nav-logo {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--fg);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.83rem;
  font-weight: 400;
  color: var(--off);
  transition: color 0.2s !important;
  letter-spacing: 0.2px;
}
.nav-links a:hover { color: var(--fg); }

.nav-resume {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--rule);
  padding: 6px 14px;
  border-radius: 20px;
  transition: border-color 0.2s, opacity 0.2s !important;
  white-space: nowrap;
}
.nav-resume:hover { border-color: var(--off); opacity: 0.85; }

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mid);
  border-radius: 6px;
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s !important;
}
.theme-toggle:hover { color: var(--fg); transform: scale(1.12); }
.theme-toggle:active { transform: scale(0.88); }

.toggle-icon-wrap {
  position: relative;
  width: 20px;
  height: 20px;
}

.icon-sun, .icon-moon {
  position: absolute;
  top: 0; left: 0;
  width: 20px; height: 20px;
  transition:
    opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.4); pointer-events: none; }
.icon-moon { opacity: 1; transform: none; }

:root.dark .icon-sun  { opacity: 1; transform: none; }
:root.dark .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.4); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 48px 72px 10%;
  position: relative;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.hero-layout {
  width: 100%;
}

.hero-inner {
  max-width: 58%;
}

.hero-visual {
  position: absolute;
  right: 0;
  bottom: 0;
  top: 0;
  width: 42%;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 80%;
  height: 68%;
  background: #c8d9f0;
  border-radius: 44% 56% 38% 62% / 52% 40% 60% 48%;
  z-index: 0;
}

.hero-photo {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-48%);
  height: 82%;
  width: auto;
  z-index: 1;
}

.hero-heading {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 6.5vw, 7rem);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -2px;
  color: var(--fg);
  margin-bottom: 28px;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 28px;
}

.hero-heading .line { display: block; }
.hero-heading .italic { font-style: italic; color: var(--off); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--off);
  max-width: 480px;
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 52px;
}

.hero-bottom {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sv {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--fg);
  line-height: 1;
  letter-spacing: -0.3px;
}

.sl {
  font-size: 0.68rem;
  color: var(--mid);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-div {
  width: 1px;
  height: 32px;
  background: var(--rule);
  flex-shrink: 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 28px;
  background: var(--fg);
  color: var(--bg);
  transition: opacity 0.2s, transform 0.2s !important;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-secondary {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 28px;
  border: 1px solid var(--rule);
  color: var(--off);
  transition: border-color 0.2s, color 0.2s, transform 0.2s !important;
}
.btn-secondary:hover { border-color: var(--off); color: var(--fg); transform: translateY(-1px); }

.btn-ghost {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 28px;
  border: 1px solid var(--rule);
  color: var(--off);
  transition: border-color 0.2s, color 0.2s, transform 0.2s !important;
}
.btn-ghost:hover { border-color: var(--off); color: var(--fg); transform: translateY(-1px); }

.hero-scroll {
  position: absolute;
  right: 48px;
  bottom: 72px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 3px;
  writing-mode: vertical-rl;
}

/* ===== ABOUT STRIP ===== */
.about-strip {
  border-bottom: 1px solid var(--rule);
  padding: 40px 48px;
}

.strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.strip-inner p {
  font-size: 0.95rem;
  color: var(--off);
  max-width: 480px;
  line-height: 1.7;
  font-weight: 300;
}
.strip-inner strong { color: var(--fg); font-weight: 500; }

.strip-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.strip-tags span {
  padding: 5px 13px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--mid);
  letter-spacing: 0.3px;
}

/* ===== SHARED ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header { margin-bottom: 52px; }

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--fg);
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: -0.8px;
}

.section-sub {
  font-size: 0.9rem;
  color: var(--mid);
  font-weight: 300;
}

/* ===== WORK ===== */
.work {
  padding: 96px 48px;
  border-bottom: 1px solid var(--rule);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

/* Card base — used as <a> tag */
.work-card {
  grid-column: span 4;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.25s, transform 0.25s !important;
}
.work-card:hover {
  border-color: var(--off);
  transform: translateY(-3px);
}

.work-card.featured    { grid-column: span 7; }
.work-card.featured-sm { grid-column: span 5; }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-num {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rule);
  letter-spacing: 1px;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wtag {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.66rem;
  font-weight: 500;
  background: rgba(0,0,0,0.04);
  color: var(--mid);
  border: 1px solid var(--rule);
}
.wtag.blue   { background: rgba(26,77,199,0.08);  color: #1A4DC7; border-color: rgba(26,77,199,0.2); }
.wtag.red    { background: rgba(196,43,32,0.08);  color: #C42B20; border-color: rgba(196,43,32,0.2); }
.wtag.yellow { background: rgba(158,114,0,0.08);  color: #9E7200; border-color: rgba(158,114,0,0.2); }
.wtag.green  { background: rgba(26,107,53,0.08);  color: #1A6B35; border-color: rgba(26,107,53,0.2); }

:root.dark .wtag.blue   { background: rgba(91,142,240,0.12);  color: #8BB4FF; border-color: rgba(91,142,240,0.2); }
:root.dark .wtag.red    { background: rgba(232,101,90,0.12);  color: #FF9B94; border-color: rgba(232,101,90,0.2); }
:root.dark .wtag.yellow { background: rgba(212,168,71,0.12);  color: #F0C86A; border-color: rgba(212,168,71,0.2); }
:root.dark .wtag.green  { background: rgba(76,175,112,0.12);  color: #6FD48E; border-color: rgba(76,175,112,0.2); }

.card-body { flex: 1; }

.card-body h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.work-card.featured .card-body h3,
.work-card.featured-sm .card-body h3 {
  font-size: 1.55rem;
}

.card-body p {
  font-size: 0.86rem;
  color: var(--off);
  line-height: 1.65;
  font-weight: 300;
}
.card-body p em { color: var(--fg); font-style: normal; font-weight: 500; }

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-pills span {
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-link {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--mid);
  white-space: nowrap;
  transition: color 0.2s !important;
  flex-shrink: 0;
}
.work-card:hover .card-link { color: var(--fg); }

/* ===== JOURNEY ===== */
.journey {
  padding: 96px 48px;
  border-bottom: 1px solid var(--rule);
}

.journey-list { display: flex; flex-direction: column; }

.journey-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 36px;
  padding: 36px 0;
  border-top: 1px solid var(--rule);
}
.journey-item:last-child { border-bottom: 1px solid var(--rule); }

.journey-year {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding-top: 5px;
}

.journey-body { display: flex; flex-direction: column; gap: 8px; }

.journey-role-line {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.journey-role-line h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.2px;
}

.journey-co {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 3px 10px;
  border-radius: 10px;
}
.journey-co.blue   { background: rgba(26,77,199,0.1);  color: #1A4DC7; }
.journey-co.red    { background: rgba(196,43,32,0.1);  color: #C42B20; }
.journey-co.yellow { background: rgba(158,114,0,0.1);  color: #9E7200; }
.journey-co.green  { background: rgba(26,107,53,0.1);  color: #1A6B35; }
.journey-co.mid    { background: rgba(0,0,0,0.05);     color: var(--mid); }

:root.dark .journey-co.blue   { background: rgba(91,142,240,0.12);  color: #8BB4FF; }
:root.dark .journey-co.red    { background: rgba(232,101,90,0.12);  color: #FF9B94; }
:root.dark .journey-co.yellow { background: rgba(212,168,71,0.12);  color: #F0C86A; }
:root.dark .journey-co.green  { background: rgba(76,175,112,0.12);  color: #6FD48E; }
:root.dark .journey-co.mid    { background: rgba(255,255,255,0.05); color: var(--mid); }

.journey-body p {
  font-size: 0.88rem;
  color: var(--off);
  line-height: 1.72;
  font-weight: 300;
  max-width: 600px;
}

/* ===== PERSONAL ===== */
.personal {
  padding: 96px 48px;
  border-bottom: 1px solid var(--rule);
}

.personal-inner { max-width: 1100px; margin: 0 auto; }
.personal-header { margin-bottom: 52px; }

.personal-list { display: flex; flex-direction: column; }

.personal-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 36px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}
.personal-item:last-child { border-bottom: 1px solid var(--rule); }

.personal-cat {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  padding-top: 5px;
  line-height: 1;
}

.personal-body h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: -0.1px;
}

.personal-body p {
  font-size: 0.88rem;
  color: var(--off);
  line-height: 1.72;
  font-weight: 300;
  max-width: 560px;
}
.personal-body p em { color: var(--fg); font-style: normal; font-weight: 500; }

/* ===== CONTACT ===== */
.contact {
  padding: 120px 48px;
  border-bottom: 1px solid var(--rule);
}

.contact-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.contact-heading {
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 52px;
}
.contact-heading em { color: var(--off); font-style: italic; }

.contact-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer {
  padding: 24px 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--mid);
}
.footer-dot { color: var(--rule); }

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .work-card         { grid-column: span 6; }
  .work-card.featured    { grid-column: span 12; }
  .work-card.featured-sm { grid-column: span 6; }
}

@media (max-width: 720px) {
  .work-card, .work-card.featured-sm { grid-column: span 12; }
  .journey-item  { grid-template-columns: 100px 1fr; gap: 20px; }
  .personal-item { grid-template-columns: 100px 1fr; gap: 20px; }
}

@media (max-width: 640px) {
  .navbar { padding: 0 20px; }
  .nav-links { gap: 16px; }
  .nav-links li:not(:last-child) { display: none; }
  .nav-right { gap: 12px; }

  .hero { padding: 0 20px 56px; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-inner { max-width: 100%; }
  .hero-scroll { display: none; }
  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 28px; }
  .hero-stats { gap: 18px; flex-wrap: wrap; }

  .about-strip { padding: 32px 20px; }
  .strip-inner { flex-direction: column; }

  .work { padding: 64px 20px; }

  .journey { padding: 64px 20px; }
  .journey-item { grid-template-columns: 1fr; gap: 10px; }

  .personal { padding: 64px 20px; }
  .personal-item { grid-template-columns: 1fr; gap: 8px; }

  .contact { padding: 80px 20px; }
  .contact-actions { flex-direction: column; align-items: center; }

  .footer { padding: 20px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .footer-dot { display: none; }
}
