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

:root {
  --bg: #faf9f7;
  --surface: #f2f0ec;
  --border: #e5e2db;
  --text: #1a1814;
  --muted: #6b6560;
  --accent: #1a6b4a;
  --accent-light: #e6f2ec;
  --radius: 12px;
  --max-w: 960px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); font-weight: 600; }

/* BACK TO TOP */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, background 0.15s;
}
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { background: #155a3e; }

/* HAMBURGER */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  transition: background 0.15s;
}
.nav-toggle:hover { background: var(--surface); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE NAV DRAWER */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 1rem 2rem 1.5rem;
  gap: 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--text); }

/* SECTIONS */
section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 2rem;
}

/* HERO */
#hero {
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}
.hero-intro {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.hero-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}
h1 span { color: var(--accent); }
.hero-bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.hero-bio p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}
.skills-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin-top: 2rem;
}
@media (max-width: 760px) {
  .skills-strip { flex-wrap: wrap; }
}
.skill-pill {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.5rem;
  white-space: nowrap;
}
.hero-cta {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #155a3e; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: #aaa; }

/* SECTION HEADERS */
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
h3.subsection {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  margin-top: 3rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
h3.subsection:first-of-type { margin-top: 0; }
.section-desc {
  color: var(--muted);
  margin-bottom: 3rem;
  max-width: 520px;
}

/* DIVIDER */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* EXPERIENCE TIMELINE */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-date {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  padding-top: 0.2rem;
  line-height: 1.4;
}
.timeline-date span {
  display: block;
  font-size: 0.78rem;
  margin-top: 0.2rem;
  color: #999;
}
.timeline-body h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.timeline-body .company {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.timeline-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.timeline-body ul li {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}
.timeline-body ul li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* EDUCATION */
.edu-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}
.edu-item:last-child { border-bottom: none; }
.edu-date {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  padding-top: 0.2rem;
  line-height: 1.4;
}
.edu-date span {
  display: block;
  font-size: 0.78rem;
  margin-top: 0.2rem;
  color: #999;
}
.edu-body h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.edu-body .school {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.edu-body p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

/* PROJECT GRID */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.project-card picture {
  display: block;
}
.project-card:hover {
  border-color: #ccc;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.project-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  display: block;
  background: var(--border);
}
.project-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}
.project-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
  width: fit-content;
}
.project-tag.game { background: #fef3e2; color: #c07a00; }
.project-tag.vr { background: #f0e8ff; color: #6d28d9; }
.project-card h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.project-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}
.project-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.project-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.project-link:hover { text-decoration: underline; }

/* CONTACT */
#contact .contact-grid {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 200px;
}
.contact-card:hover {
  border-color: #ccc;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.contact-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-card-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2rem;
  text-align: center;
}
footer p { color: var(--muted); font-size: 0.82rem; }

/* RESPONSIVE */
@media (max-width: 640px) {
  .hero-bio { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .edu-item { grid-template-columns: 1fr; gap: 0.25rem; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  #hero { padding-top: 1.5rem; }
}
