:root{
  --bg: #0E1013;
  --surface: #16191D;
  --text: #ECE8E1;
  --text-muted: #8B8F94;
  --accent: #C9A227;
  --line: #2A2D31;

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow:hidden;
}
body.no-scroll{ overflow:hidden; }

a{ color: inherit; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- background decorative word ---------- */
.bg-word{
  position: fixed;
  left: 4vw;
  top: 8vh;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(80px, 16vw, 260px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236,232,225,0.06);
  letter-spacing: -0.02em;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* ---------- topbar ---------- */
.topbar{
  position: fixed;
  top:0; left:0; right:0;
  display:flex;
  align-items:center;
  justify-content: flex-end;
  padding: 28px 5vw;
  z-index: 50;
}
.nav{
  display:flex;
  gap: 36px;
}
.nav-link{
  background:none;
  border:none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  cursor:pointer;
  padding: 4px 0;
  position:relative;
  transition: color .3s ease;
}
.nav-link::after{
  content:'';
  position:absolute;
  left:0; right:0; bottom:-4px;
  height:1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.nav-link:hover{ color: var(--text); }
.nav-link.is-active{ color: var(--text); }
.nav-link.is-active::after{ transform: scaleX(1); }

.nav-toggle{
  display:none;
  flex-direction:column;
  gap:5px;
  background:none;
  border:none;
  cursor:pointer;
  padding: 6px;
}
.nav-toggle span{
  width: 22px; height:1px;
  background: var(--text);
}

/* ---------- social rail ---------- */
.social{
  position: fixed;
  right: 28px;
  bottom: 40px;
  z-index: 40;
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 14px;
}
.social a{
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-decoration:none;
  transition: color .3s ease;
}
.social a:hover{ color: var(--accent); }
.social-rule{
  width: 1px;
  height: 60px;
  background: var(--line);
}

/* ---------- main / panels ---------- */
main{
  position:relative;
  height: 100vh;
  width: 100vw;
}
.panel{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  z-index: 1;
}
.panel.is-active{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  z-index: 2;
}
.panel-inner{
  width:100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 5vw 60px;
}

/* ---------- ABOUT ---------- */
.about-grid{
  display:grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 6vw;
  align-items:center;
}
.portrait-wrap{
  position:relative;
  height: 72vh;
  max-height: 720px;
  border-radius: 4px;
  overflow:hidden;
  background: var(--surface);
}
.portrait{
  width:100%;
  height:100%;
  object-fit: cover;
  object-position: top center;
  filter: contrast(1.03);
}
.portrait-wrap::after{
  content:'';
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(14,16,19,0) 55%, rgba(14,16,19,0.55) 100%);
  pointer-events:none;
}

.about-copy{ position:relative; z-index:2; }
.eyebrow-line{
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 18px;
}
.name{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.02;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.role{
  font-size: 16px;
  color: var(--accent);
  margin: 0 0 28px;
  font-family: var(--font-mono);
}
.bio-text{
  max-width: 62ch;
  display:flex;
  flex-direction:column;
  gap: 16px;
}
.bio-text p{
  margin:0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  opacity: 0.88;
}
.cta-btn{
  margin-top: 34px;
  background:none;
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 13px 26px;
  border-radius: 2px;
  cursor:pointer;
  transition: border-color .3s ease, color .3s ease, transform .3s ease;
}
.cta-btn:hover{
  border-color: var(--accent);
  color: var(--accent);
  transform: translateX(4px);
}

/* ---------- RESUME ---------- */
.resume-grid{
  display:grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 6vw;
  align-items:start;
  max-height: 84vh;
  overflow-y:auto;
  padding-right: 4px;
}
.resume-col{ position:relative; z-index:2; }
.section-title{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 20px;
  padding-top: 8px;
}
.resume-col .section-title:first-child{ padding-top:0; }

.timeline{
  list-style:none;
  margin:0 0 44px;
  padding:0;
  display:flex;
  flex-direction:column;
}
.timeline li{
  display:flex;
  flex-direction:column;
  gap: 4px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.timeline li:last-child{ border-bottom: 1px solid var(--line); }
.timeline-date{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.03em;
}
.timeline-title{
  font-size: 15.5px;
  color: var(--text);
}
.timeline-sub{
  font-size: 13.5px;
  color: var(--text-muted);
}

.skills{ display:flex; flex-direction:column; gap: 26px; }
.skill-head{
  display:flex;
  justify-content:space-between;
  font-size: 14px;
  margin-bottom: 10px;
}
.skill-num{
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 13px;
}
.skill-track{
  height: 2px;
  background: var(--line);
  position:relative;
}
.skill-fill{
  position:absolute;
  left:0; top:0; bottom:0;
  width:0%;
  background: var(--accent);
}

/* ---------- CONTACT ---------- */
.contact-grid{
  display:flex;
  align-items:center;
}
.contact-copy{ max-width: 640px; position:relative; z-index:2; }
.contact-title{
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
  margin: 14px 0 26px;
}
.contact-text{
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  opacity: 0.85;
  max-width: 52ch;
  margin: 0 0 34px;
}
.email-link{
  display:inline-block;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--accent);
  text-decoration:none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: opacity .3s ease;
}
.email-link:hover{ opacity: 0.7; }

/* ---------- responsive ---------- */
@media (max-width: 900px){
  body{ overflow-y:auto; }
  .bg-word{ font-size: clamp(60px, 22vw, 140px); top: 6vh; }
  .topbar{ padding: 20px 6vw; }
  .nav{
    position: fixed;
    top: 68px; right: 6vw;
    background: var(--surface);
    border: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px;
    display:none;
    z-index: 60;
  }
  .nav.is-open{ display:flex; }
  .nav-link{ padding: 12px 18px; }
  .nav-toggle{ display:flex; }

  main{ position:static; height:auto; }
  .panel{
    position:static;
    display:none;
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  .panel.is-active{ display:flex; }
  .panel-inner{ padding: 110px 6vw 60px; }

  .about-grid{ grid-template-columns: 1fr; gap: 40px; }
  .portrait-wrap{ height: 52vh; }

  .resume-grid{
    grid-template-columns: 1fr;
    max-height: none;
    overflow:visible;
  }

  .social{ display:none; }
}
