:root {
  --bg:      #f7f5f0;
  --surface: #ffffff;
  --text:    #1c1f2e;
  --muted:   #54586a;
  --yellow:  #f5c400;
  --border:  #e3dfd6;
  --mono:    'Space Mono', monospace;
  --sans:    'Plus Jakarta Sans', sans-serif;
  --w:       1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(247,245,240,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
nav.scrolled { border-color: var(--border); }
.nav-inner {
  max-width: var(--w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; padding: 14px 40px;
}
.logo-box {
  width: 40px; height: 40px; background: var(--yellow); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 19px; color: var(--text);
  text-decoration: none;
}
.nav-links { display: flex; gap: 24px; align-items: center; justify-content: center; }
.nav-links a {
  font-family: var(--mono); font-size: 14px; color: var(--muted);
  text-decoration: none; transition: color .2s; white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav-links a .n { color: var(--yellow); margin-right: 4px; }
.nav-resume {
  font-family: var(--mono); font-size: 14px; padding: 7px 18px;
  border: 1.5px solid var(--yellow); background: var(--yellow); color: var(--text);
  text-decoration: none; transition: opacity .2s; white-space: nowrap;
}
.nav-resume:hover { opacity: .82; }
.nav-right {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
}
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; margin-left: auto; border: none; background: none;
}
.hamburger span { width: 22px; height: 2px; background: var(--text); display: block; transition: all .3s; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 760px) {
  .nav-links, .nav-resume { display: none; }
  .nav-inner { grid-template-columns: auto 1fr; }
  .hamburger { display: flex; min-width: 44px; min-height: 44px; justify-content: center; align-items: center; }
}

/* Mobile overlay */
.mobile-nav {
  display: none; position: fixed; inset: 0; background: var(--bg); z-index: 199;
  flex-direction: column; align-items: center; justify-content: center; gap: 36px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--mono); font-size: 20px; color: var(--text); text-decoration: none;
}
.mobile-nav a .n { color: var(--yellow); }
.mob-close {
  position: absolute; top: 20px; right: 28px; font-size: 36px;
  background: none; border: none; cursor: pointer; color: var(--text);
  line-height: 1;
}

/* ── SIDEBARS (desktop ≥ 1180px) ── */
.sidebar {
  position: fixed; bottom: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.sidebar::after {
  content: ''; width: 1px; height: 90px; background: var(--muted); display: block;
}
.sidebar.left { left: 32px; }
.sidebar.right { right: 32px; }
.sidebar a {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  text-decoration: none; transition: all .2s; letter-spacing: 1px;
}
.sidebar a:hover { color: var(--yellow); transform: translateY(-3px); }
.sidebar.right a { writing-mode: vertical-rl; letter-spacing: 3px; }
@media (max-width: 1180px) { .sidebar { display: none; } }

/* ── HERO ── */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 120px 40px 80px;
}
.hero-inner { max-width: var(--w); margin: 0 auto; width: 100%; }

.hero-name {
  font-size: clamp(22px, 7vw, 84px); font-weight: 800;
  line-height: 1.05; color: var(--text); margin-bottom: 20px;
}
.hero-name .hl {
  background: linear-gradient(transparent 48%, var(--yellow) 48%);
  padding-bottom: 5px; display: inline;
}

.hero-sub {
  font-size: clamp(20px, 3.2vw, 36px); font-weight: 600;
  color: #5d6478; max-width: 660px; line-height: 1.2; margin-bottom: 22px;
  text-wrap: balance;
}
.hero-body {
  font-size: 16px; color: var(--muted); max-width: 490px;
  line-height: 1.75; margin-bottom: 38px;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-y {
  padding: 13px 30px; background: var(--yellow); color: var(--text);
  font-weight: 700; font-size: 15px; text-decoration: none; transition: opacity .2s;
}
.btn-y:hover { opacity: .82; }
.btn-ghost {
  padding: 13px 30px; border: 1.5px solid var(--text);
  color: var(--text); font-family: var(--mono); font-size: 13px;
  text-decoration: none; transition: all .2s;
}
.btn-ghost:hover { background: var(--text); color: var(--bg); }

/* ── SECTION BASE ── */
.sec { padding: 96px 40px; }
.sec-inner { max-width: var(--w); margin: 0 auto; }
.sec-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 52px;
}
.sec-head .n { font-family: var(--mono); font-size: 14px; color: var(--yellow); flex-shrink: 0; }
.sec-head h2 { font-size: clamp(21px, 2.8vw, 27px); font-weight: 700; white-space: nowrap; }
.sec-head::after { content: ''; flex: 1; height: 1px; background: var(--border); min-width: 20px; }

/* ── ABOUT ── */
#about { background: var(--surface); padding-bottom: 48px; }
.about-grid {
  display: grid; grid-template-columns: 1fr 1.7fr; gap: 64px; align-items: start;
}
@media (max-width: 780px) { .about-grid { grid-template-columns: 1fr; gap: 44px; } }

.photo-wrap { position: relative; }
.photo-wrap .img-placeholder {
  width: 100%; aspect-ratio: 3/4; border-radius: 0;
}
.photo-wrap::after {
  content: ''; position: absolute;
  top: 14px; left: 14px; right: -14px; bottom: -14px;
  border: 2px solid var(--yellow); z-index: 0; pointer-events: none;
}

.about-body p { font-size: 15.5px; line-height: 1.82; color: #3b4059; margin-bottom: 18px; }

.curr-block { margin: 26px 0 22px; }
.curr-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px;
  color: var(--muted); margin-bottom: 14px; text-transform: uppercase; font-weight: 700;
}
.curr-item { display: flex; gap: 12px; margin-bottom: 8px; align-items: flex-start; }
.curr-item .arr { color: var(--yellow); font-size: 14px; flex-shrink: 0; margin-top: 3px; }
.curr-item p { font-size: 15px; line-height: 1.7; color: #3b4059; }
.tag-pill {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  background: var(--yellow); color: var(--text); padding: 1px 8px;
  margin-left: 6px; vertical-align: middle; line-height: 18px;
}

.about-rule { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.focused-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px;
  color: var(--muted); margin-bottom: 14px; text-transform: uppercase; font-weight: 700;
}
.focused-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; list-style: none;
}
.focused-list li {
  font-size: 14px; color: #3b4059; padding: 5px 0;
  display: flex; gap: 8px; align-items: center;
}
.focused-list li::before { content: '▸'; color: var(--yellow); font-size: 11px; flex-shrink: 0; }

/* ── INTRO LINER ── */
.intro-liner {
  padding: 0 40px 44px; background: var(--surface);
}
.intro-liner-inner {
  max-width: var(--w); margin: 0 auto;
  border-left: 3px solid var(--yellow); padding-left: 22px;
}
.intro-liner-inner p {
  font-size: 17px; font-style: italic; color: var(--muted); line-height: 1.75;
}

/* ── TAG STRIP ── */
.tag-strip { padding: 0 40px 52px; background: var(--surface); }
.tag-strip-inner { max-width: var(--w); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px; }
.strip-tag {
  font-family: var(--mono); font-size: 13px; color: var(--text);
  border: 1.5px solid var(--border); padding: 6px 16px; background: var(--bg);
  letter-spacing: .5px;
}

/* ── PROJECTS ── */
#projects { padding-top: 0; }
.proj-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
@media (max-width: 680px) { .proj-grid { grid-template-columns: 1fr; } }

.proj-card {
  background: var(--surface); border: 1px solid var(--border);
  overflow: hidden; transition: transform .25s, box-shadow .25s;
}
.proj-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(0,0,0,.07); }

.proj-card .img-placeholder { width: 100%; height: 220px; border-radius: 0; aspect-ratio: unset; }

.proj-body { padding: 20px 22px 22px; }
.proj-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.proj-desc {
  font-size: 15px; line-height: 1.72; color: var(--muted);
  overflow: hidden;
}
.proj-desc.clamped {
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.read-more {
  background: none; border: none; cursor: pointer; padding: 7px 0 0;
  font-family: var(--mono); font-size: 13px; color: #b8920a;
  display: block; text-align: left;
}
.read-more:hover { text-decoration: underline; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.proj-tag {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  background: var(--bg); padding: 3px 9px; border: 1px solid var(--border);
}

/* ── CONTACT ── */
#contact { background: var(--bg); text-align: center; }
.contact-eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 2px;
  color: #b8920a; margin-bottom: 16px;
}
.contact-title {
  font-size: clamp(34px, 5vw, 54px); font-weight: 800;
  margin-bottom: 20px;
}
.contact-body {
  font-size: 16px; color: var(--muted); max-width: 440px;
  margin: 0 auto 36px; line-height: 1.75;
}
.contact-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.contact-link {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  text-decoration: none; transition: color .2s; letter-spacing: .5px;
}
.contact-link:hover { color: var(--yellow); }

/* ── GALLERY ── */
#gallery { background: var(--surface); }
.gallery-note {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  margin-top: -36px; margin-bottom: 32px; letter-spacing: .5px;
}
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
/* gallery-item handles aspect-ratio via its own rule */
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .gallery-grid { grid-template-columns: 1fr; } }

/* ── FOOTER ── */
footer {
  text-align: center; padding: 22px 40px;
  font-family: var(--mono); font-size: 11px; color: #5e5952;
  border-top: 1px solid var(--border);
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute; top: -44px; left: 0; padding: 10px 18px;
  background: var(--yellow); color: var(--text);
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  text-decoration: none; z-index: 9999; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── FADE-IN ── */
.fi { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.fi.vis { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .fi { opacity: 1; transform: none; transition: none; }
  .gallery-item img { transition: none; }
  .proj-card { transition: none; }
}

/* ── RESPONSIVE MISC ── */
@media (max-width: 600px) {
  .sec { padding: 64px 20px; }
  .intro-liner, .tag-strip { padding-left: 20px; padding-right: 20px; }
  #hero { padding: 100px 20px 60px; }
  .hero-btns { flex-direction: row; flex-wrap: wrap; }
  .photo-wrap::after { display: none; }
  .focused-list { grid-template-columns: 1fr; }
}

/* ── REAL IMAGES ── */
.photo-wrap img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.proj-card img { width: 100%; height: 220px; object-fit: cover; display: block; }
.gallery-item {
  width: 100%; aspect-ratio: 1; overflow: hidden; cursor: pointer; display: block;
  position: relative;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.gallery-item:hover img { transform: scale(1.05); }

/* ── IMAGE PLACEHOLDERS ── */
.img-placeholder {
  background: #f0ece3;
  border: 2px dashed #c9c3b8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9490;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
