/* ═══════════════════════════════════════════════════════════
   VARIABLES
══════════════════════════════════════════════════════════════ */
:root {
  --bg:           oklch(10%   0.012 250);
  --bg-alt:       oklch(13.5% 0.012 250);
  --bg-dark:      oklch(7.5%  0.012 250);
  --surface:      oklch(17%   0.013 250);
  --surface-hi:   oklch(21%   0.013 250);
  --border:       oklch(24%   0.012 250);
  --border-dim:   oklch(19%   0.012 250);

  --text:         oklch(93%  0.008 250);
  --text-body:    oklch(76%  0.010 250);
  --text-dim:     oklch(60%  0.008 250);
  --text-muted:   oklch(44%  0.008 250);

  --accent:       oklch(62%  0.20  250);
  --accent-hi:    oklch(70%  0.20  250);
  --accent2:      oklch(68%  0.14  220);
  --accent2-hi:   oklch(76%  0.14  220);

  --font:   'IBM Plex Mono', monospace;
  --nav-h:  64px;
  --max-w:  1360px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}

img   { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; }
a      { font-family: var(--font); }

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════════ */
@keyframes charReveal {
  from { opacity: 0; transform: translateY(110%); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseDot {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}
@keyframes scrollLine {
  0%   { transform: translateY(0);     opacity: 1; }
  60%  { transform: translateY(12px);  opacity: 0; }
  61%  { transform: translateY(-12px); opacity: 0; }
  100% { transform: translateY(0);     opacity: 1; }
}
@keyframes scrollHintAppear {
  from { opacity: 0; transform: translateX(-50%) translateY(18px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   SCROLL REVEALS
══════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(64px) scale(0.97);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--rd, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-slide {
  opacity: 0;
  transform: translateX(-52px) scale(0.97);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--rd, 0s);
}
.reveal-slide.is-visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}


/* Split title characters */
.title-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(56px) scale(0.88);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s  cubic-bezier(0.16, 1, 0.3, 1);
}
.title-char.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ═══════════════════════════════════════════════════════════
   NAV
══════════════════════════════════════════════════════════════ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
}
#nav.scrolled {
  background: oklch(11% 0.013 250 / 0.92);
  border-bottom-color: var(--border-dim);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 52px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  background: none;
  border: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: color 0.2s;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 36px;
}
.nav-link {
  background: none;
  border: none;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.10em;
  padding: 0;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--accent); }

.nav-social {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}
.nav-social-link {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.10em;
  transition: color 0.2s;
}
.nav-social-link:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════
   SIDE DOTS
══════════════════════════════════════════════════════════════ */
#side-dots {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  cursor: pointer;
  background: var(--border);
  transition: background 0.35s ease, transform 0.35s ease;
}
.dot.active {
  background: var(--accent);
  transform: scale(1.7);
}

/* ═══════════════════════════════════════════════════════════
   SECTION SHARED
══════════════════════════════════════════════════════════════ */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 128px 52px;
}
.section-alt  { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); }

.section-head {
  position: relative;
  margin-bottom: 80px;
}
.section-ghost {
  position: absolute;
  top: -20px;
  left: -10px;
  font-size: clamp(100px, 13vw, 164px);
  font-weight: 700;
  color: var(--surface);
  line-height: 1;
  user-select: none;
  letter-spacing: -8px;
  pointer-events: none;
  z-index: 0;
}
.section-title {
  position: relative;
  z-index: 1;
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* ═══════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hero-grid::before {
  content: '';
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 65% 55% at 8% 55%,  oklch(52% 0.18 250 / 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 38% 32% at 78% 12%,  oklch(58% 0.14 220 / 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 50% 42% at 52% 88%,  oklch(46% 0.16 265 / 0.07) 0%, transparent 58%);
  animation: heroBg 14s ease-in-out infinite alternate;
  filter: blur(2px);
}

@keyframes heroBg {
  from { transform: scale(1)    translateY(0);     opacity: 0.85; }
  to   { transform: scale(1.06) translateY(-14px); opacity: 1; }
}
@keyframes tagPop {
  0%   { opacity: 0; transform: scale(0.72) translateY(10px); }
  65%  { opacity: 1; transform: scale(1.08) translateY(-3px); }
  100% { opacity: 1; transform: scale(1)    translateY(0); }
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 88px 52px 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 56px;
  animation: fadeInUp 0.6s ease 0.1s both;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
  animation: pulseDot 2.5s ease infinite;
}

.hero-name {
  margin-bottom: 36px;
  line-height: 0.86;
}
.name-line {
  display: flex;
  overflow: hidden;
  margin-bottom: 6px;
  font-size: clamp(68px, 11.2vw, 146px);
  font-weight: 700;
  letter-spacing: -0.035em;
}
.name-line:last-child { margin-bottom: 0; }

.char-reveal {
  display: inline-block;
  animation: charReveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s) both;
}
.accent-char { color: var(--accent); }

.hero-role {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.role-bar {
  width: 44px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}
.role-text {
  font-size: clamp(13px, 1.6vw, 19px);
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.hero-tagline {
  font-size: clamp(14px, 1.25vw, 17px);
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.85;
  font-weight: 300;
  animation: fadeInUp 0.8s ease var(--d, 0s) both;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 44px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease var(--d, 0s) both;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease var(--d, 0s) both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--accent);
  color: oklch(10% 0.012 250);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.10em;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover {
  background: var(--accent-hi);
  transform: translateY(-3px);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.10em;
  font-weight: 500;
  border: 1.5px solid var(--border);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-outline:hover {
  background: var(--surface);
  border-color: var(--text-dim);
  transform: translateY(-3px);
}

.scroll-hint {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  z-index: 1;
  /* custom keyframe preserves translateX(-50%) through the animation */
  animation: scrollHintAppear 0.8s ease var(--d, 0s) both;
}
.scroll-hint-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}
.scroll-line {
  width: 1px;
  height: 40px;
  overflow: hidden;
  position: relative;
  background: var(--border-dim);
}
.scroll-line-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 2.4s ease infinite;
}

/* ═══════════════════════════════════════════════════════════
   ABOUT
══════════════════════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 80px;
  align-items: start;
}
.bio-text {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.9;
  color: var(--text-body);
  font-weight: 300;
  margin-bottom: 24px;
  text-wrap: pretty;
}
.inline-link {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid oklch(62% 0.20 250 / 0.40);
  padding-bottom: 3px;
  font-weight: 600;
  margin-top: 16px;
  transition: color 0.2s, border-color 0.2s;
}
.inline-link:hover {
  color: var(--accent-hi);
  border-color: oklch(70% 0.20 250 / 0.65);
}

.about-photo-wrap {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.about-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(15%);
  transition: filter 0.4s ease, transform 0.5s ease;
}
.about-photo-wrap:hover .about-photo {
  filter: grayscale(0%);
  transform: scale(1.02);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat-card {
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--accent); }
.stat-num {
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--accent2);
}
.stat-num.accent-num { color: var(--accent); }
.stat-label {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-top: 8px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════
   SKILLS
══════════════════════════════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px 80px;
}
.skill-group-label {
  font-size: 9px;
  letter-spacing: 0.20em;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 600;
}
.skill-group-label.secondary { color: var(--accent2); }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  padding: 8px 15px;
  border: 1px solid var(--border);
  color: var(--text-body);
  font-size: 12px;
  letter-spacing: 0.04em;
  cursor: default;
  font-family: var(--font);
  opacity: 0;
  transform: scale(0.72) translateY(10px);
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--text);
}
.tag.secondary:hover {
  border-color: var(--accent2);
  color: var(--text);
}
.tag.tag-in {
  animation: tagPop 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ═══════════════════════════════════════════════════════════
   EXPERIENCE
══════════════════════════════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: 36px;
  border-left: 2px solid var(--border);
}
.timeline-item {
  margin-bottom: 72px;
  position: relative;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -44px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--bg);
}
.accent-dot    { background: var(--accent); }
.secondary-dot { background: var(--accent2); }
.dim-dot       { background: var(--text-muted); }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.timeline-role {
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.timeline-company {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.accent-text    { color: var(--accent); }
.secondary-text { color: var(--accent2); }

.timeline-period {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 5px 12px;
  border: 1px solid var(--border);
  white-space: nowrap;
  align-self: flex-start;
  margin-top: 4px;
  flex-shrink: 0;
}

.timeline-bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.timeline-bullets li {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.8;
  font-weight: 300;
  padding-left: 18px;
  position: relative;
  text-wrap: pretty;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.timeline-bullets li.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.timeline-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}
.secondary-bullets li::before { color: var(--accent2); }

.timeline-note {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.8;
  font-weight: 300;
  font-style: italic;
  text-wrap: pretty;
}

/* ═══════════════════════════════════════════════════════════
   PROJECTS
══════════════════════════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3px;
  min-height: 340px;
}

.project-card {
  background: var(--surface);
  transition: background 0.3s;
}
.project-card:hover { background: var(--surface-hi); }

.project-card-inner {
  padding: 44px;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
}
.project-badge {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
}
.project-link {
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.project-link:hover { color: var(--accent); }

.project-title {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.project-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.85;
  font-weight: 300;
  flex: 1;
  margin-bottom: 28px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.project-tag {
  font-size: 10px;
  padding: 4px 11px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  letter-spacing: 0.06em;
  font-family: var(--font);
}

.project-more {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-decoration: none;
  background: oklch(13% 0.012 250);
  transition: background 0.3s;
  padding: 32px;
  cursor: pointer;
}
.project-more:hover { background: var(--surface); }
.project-more-icon {
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: var(--text-dim);
  margin-bottom: 16px;
  transition: border-color 0.3s, color 0.3s;
}
.project-more:hover .project-more-icon {
  border-color: var(--accent);
  color: var(--accent);
}
.project-more-label {
  font-size: 10px;
  letter-spacing: 0.20em;
  color: var(--text-dim);
  font-family: var(--font);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
#footer {
  padding: 52px;
  background: var(--bg-dark);
  border-top: 1px solid var(--border-dim);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.footer-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}
.footer-links { display: flex; gap: 28px; }
.footer-link {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.10em;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }
.footer-copy {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.10em;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .section-inner { padding: 80px 28px; }
  .nav-inner { padding: 0 28px; }
  .hero-content { padding: 88px 28px 44px; }
  #footer { padding: 40px 28px; }
  #side-dots { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 52px; }
  .skills-grid { grid-template-columns: 1fr; gap: 36px; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-more { min-height: 180px; }
}

@media (max-width: 540px) {
  .name-line { font-size: clamp(52px, 15vw, 90px); }
  .hero-content { padding: 88px 20px 44px; }
  .section-inner { padding: 64px 20px; }
  #footer { padding: 36px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .timeline { padding-left: 24px; }
  .timeline-dot { left: -32px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .project-card-inner { padding: 28px 24px; }
  .nav-inner { padding: 0 20px; }
}
