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

/* ── THEME ── */
:root {
  --bg:          #0d0d0d;
  --bg-card:     #141414;
  --bg-card2:    #1a1a1a;
  --border:      #222;
  --border-hi:   #333;
  --text:        #e8e8e8;
  --text-dim:    #aaa;
  --muted:       #666;
  --accent:      #c9a96e;
  --accent-dim:  #8a7048;
  --accent-glow: rgba(201,169,110,0.12);
  --green:       #4caf7d;
  --glow-color:  rgba(201,169,110,0.045);
  --nav-bg:      rgba(13,13,13,0.82);
  --radius:      8px;
}

html { scroll-behavior: smooth; scroll-padding-top: 54px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── NOISE TEXTURE ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute; top: -100%; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #0d0d0d;
  padding: 8px 20px; border-radius: 0 0 var(--radius) var(--radius);
  font-size: 13px; font-weight: 600; text-decoration: none;
  z-index: 200; white-space: nowrap;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; outline: none; }

/* ── CURSOR GLOW ── */
#cursor-glow {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: 0; transition: opacity 1s ease;
}
#cursor-glow.active { opacity: 1; }

/* ── LAYOUT ── */
.container { max-width: 740px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
section { padding: 88px 0; }
section + section { border-top: 1px solid var(--border); }

/* ── FADE ── */
.fade {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade.visible { opacity: 1; transform: none; }

/* ── NAME STAGGER ── */
.hero-name .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  animation: charReveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes charReveal {
  to { opacity: 1; transform: none; }
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,13,13,0.97);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(1px)) {
  nav { background: var(--nav-bg); backdrop-filter: blur(16px); }
}
nav .inner {
  max-width: 740px; margin: 0 auto; padding: 0 28px;
  height: 54px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 14px; font-weight: 600; color: var(--accent);
  letter-spacing: 0.06em; text-decoration: none;
}
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-links { display: flex; gap: 20px; list-style: none; }
.nav-links a {
  font-size: 13px; color: var(--muted); text-decoration: none;
  transition: color 0.2s; position: relative; padding-bottom: 2px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transition: transform 0.2s ease;
}
.nav-links a:hover { color: var(--text-dim); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after { transform: scaleX(1); }
@media (max-width: 780px) and (min-width: 601px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 12px; }
}

/* scroll progress bar */
.progress-bar {
  position: absolute; bottom: 0; left: 0;
  height: 2px; width: 0%;
  background: var(--accent);
  transition: width 0.08s linear; z-index: 1;
}

.nav-resume {
  font-size: 12px; font-weight: 500;
  color: var(--accent); text-decoration: none;
  border: 1px solid var(--accent-dim);
  padding: 5px 13px; border-radius: 5px;
  transition: background 0.2s, color 0.2s; white-space: nowrap;
}
.nav-resume:hover { background: var(--accent-glow); }

/* ── HERO ── */
#hero {
  position: relative;
  padding-top: 150px; padding-bottom: 100px;
  overflow: hidden;
}
#hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(201,169,110,0.12) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 100%);
  pointer-events: none; opacity: 0.55;
}
#hero::after {
  content: ''; position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--text-dim);
  background: var(--bg-card); border: 1px solid var(--border-hi);
  padding: 5px 12px; border-radius: 20px; margin-bottom: 28px;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  flex-shrink: 0; animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
.badge-sep { color: var(--border-hi); }
.badge-open { color: var(--green); }

.hero-name {
  font-size: clamp(40px, 8vw, 64px);
  font-weight: 300; letter-spacing: -0.025em;
  line-height: 1.08; margin-bottom: 8px;
}
.hero-name strong { font-weight: 700; }
.hero-title { font-size: 16px; color: var(--accent); letter-spacing: 0.01em; margin-bottom: 16px; }
.hero-sub {
  font-size: 15px; color: var(--text-dim);
  max-width: 480px; line-height: 1.65; margin-bottom: 44px;
}

/* stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 36px;
}
.stat { background: var(--bg-card); padding: 18px 16px; text-align: center; }
.stat-num {
  font-size: 22px; font-weight: 700; color: var(--accent);
  letter-spacing: -0.02em; line-height: 1; margin-bottom: 5px;
}
.stat-label { font-size: 11px; color: var(--muted); line-height: 1.3; }

/* cta row */
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500;
  color: #0d0d0d; background: var(--accent);
  padding: 9px 18px; border-radius: var(--radius);
  text-decoration: none; transition: opacity 0.2s, transform 0.15s;
  min-height: 44px;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-links a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted); text-decoration: none;
  border: 1px solid var(--border); padding: 8px 14px; border-radius: var(--radius);
  transition: color 0.2s, border-color 0.2s; min-height: 44px;
}
.hero-links a:hover { color: var(--accent); border-color: var(--accent-dim); }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted); background: none; cursor: pointer;
  border: 1px solid var(--border); padding: 8px 14px; border-radius: var(--radius);
  font-family: inherit; transition: color 0.2s, border-color 0.2s; min-height: 44px;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

/* ── ABOUT ── */
.about-text {
  font-size: 16px; line-height: 1.75;
  color: var(--text-dim); max-width: 620px;
}
.about-text strong { color: var(--text); font-weight: 500; }

/* ── CLIENTS ── */
#clients { padding: 40px 0; }
#clients .container { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.clients-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.clients-rule { flex: 1; height: 1px; background: var(--border); min-width: 20px; }
.clients-list { display: flex; gap: 8px; flex-wrap: wrap; }
.client-chip {
  font-size: 12px; font-weight: 500; color: var(--text-dim);
  background: var(--bg-card); border: 1px solid var(--border-hi);
  padding: 5px 13px; border-radius: 20px;
}

/* ── SECTION LABEL ── */
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 40px;
}

/* ── EXPERIENCE ── */
.timeline { display: flex; flex-direction: column; gap: 52px; }
.tl-item { display: grid; grid-template-columns: 1px 1fr; gap: 0 32px; }
.tl-line { width: 1px; background: var(--border); position: relative; }
.tl-line::before {
  content: ''; position: absolute; top: 6px; left: -4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent-glow);
}
.tl-body { padding-bottom: 8px; }
.tl-header {
  display: flex; justify-content: space-between;
  align-items: baseline; flex-wrap: wrap; gap: 4px; margin-bottom: 2px;
}
.tl-title { font-size: 16px; font-weight: 600; }
.tl-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tl-company { font-size: 13px; color: var(--accent); margin-bottom: 12px; }
.tl-impact {
  display: flex; gap: 16px; flex-wrap: wrap;
  background: var(--accent-glow); border: 1px solid rgba(201,169,110,0.15);
  border-radius: 6px; padding: 12px 16px; margin-bottom: 16px;
}
.tl-impact-item { font-size: 12px; color: var(--text-dim); }
.tl-impact-item strong { color: var(--accent); font-weight: 600; }
.tl-points { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.tl-points li {
  font-size: 13.5px; color: var(--text-dim);
  padding-left: 16px; position: relative; line-height: 1.6;
}
.tl-points li::before { content: '–'; position: absolute; left: 0; color: var(--accent-dim); }
.hi { color: var(--accent); font-weight: 500; }

/* ── SKILLS ── */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 520px) { .skills-grid { grid-template-columns: 1fr; } }
.skill-cat {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-tag {
  font-size: 12px; color: var(--text-dim);
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 4px 11px; border-radius: 5px;
}
.skill-tag.primary {
  color: var(--accent); background: var(--accent-glow);
  border-color: rgba(201,169,110,0.2); font-weight: 500;
}

/* ── PROJECTS ── */
.projects-grid { display: flex; flex-direction: column; gap: 16px; }
.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: border-color 0.25s, background 0.25s;
}
.project-card:hover { border-color: var(--accent-dim); background: var(--bg-card2); }
.proj-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px; margin-bottom: 10px;
}
.proj-title { font-size: 15px; font-weight: 600; }
.proj-badge {
  font-size: 11px; font-weight: 500; white-space: nowrap;
  color: var(--accent-dim); background: var(--accent-glow);
  border: 1px solid rgba(201,169,110,0.15);
  padding: 3px 9px; border-radius: 20px; flex-shrink: 0;
  text-decoration: none; transition: color 0.2s, background 0.2s;
}
a.proj-badge:hover { color: var(--accent); filter: brightness(1.2); }
.proj-desc { font-size: 13.5px; color: var(--text-dim); line-height: 1.65; margin-bottom: 16px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.proj-tag {
  font-size: 11px; font-weight: 500; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border-hi);
  padding: 3px 9px; border-radius: 4px;
}

/* ── EDUCATION ── */
.edu-card {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 32px;
}
.edu-degree { font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.edu-school { font-size: 13px; color: var(--accent); margin-bottom: 5px; }
.edu-years { font-size: 12px; color: var(--muted); }
.edu-gpa-num {
  font-size: 36px; font-weight: 300; color: var(--accent);
  letter-spacing: -0.03em; line-height: 1; text-align: right;
}
.edu-gpa-label { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: right; }

/* ── CONTACT ── */
.contact-inner { max-width: 540px; }
.contact-heading {
  font-size: clamp(22px, 4vw, 30px); font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 12px;
}
.contact-sub { font-size: 15px; color: var(--text-dim); line-height: 1.7; margin-bottom: 32px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 500;
  color: var(--accent); background: transparent;
  border: 1px solid var(--accent-dim);
  padding: 9px 18px; border-radius: var(--radius);
  text-decoration: none; transition: background 0.2s;
  min-height: 44px;
}
.btn-outline:hover { background: var(--accent-glow); }

/* ── HAMBURGER ── */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 8px;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px; flex-shrink: 0;
}
.hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: currentColor; border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--border); padding: 44px 0; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-links a { font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { font-size: 12px; color: var(--border-hi); }
.footer-bottom a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-bottom a:hover { color: var(--accent); }

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 99;
  width: 44px; height: 44px;
  background: var(--bg-card); border: 1px solid var(--border-hi);
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, color 0.2s, border-color 0.2s;
  pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { color: var(--accent); border-color: var(--accent-dim); }

/* ── FOCUS ── */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px; border-radius: 4px;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  section { padding: 64px 0; }
  #hero { padding-top: 116px; padding-bottom: 72px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tl-item { grid-template-columns: 1px 1fr; gap: 0 20px; }
  .edu-card { padding: 24px; }
  .hero-links a, .copy-btn, .nav-resume, .btn-primary { min-height: 44px; }

  /* Hamburger + dropdown nav */
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute; top: 54px; left: 0; right: 0;
    background: rgba(13,13,13,0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0; padding: 6px 0;
  }
  @supports (backdrop-filter: blur(1px)) {
    .nav-links { background: rgba(13,13,13,0.92); backdrop-filter: blur(20px); }
  }
  .nav-links.open { display: flex; }
  .nav-links li a {
    display: flex; align-items: center;
    padding: 0 28px; min-height: 48px;
    font-size: 14px; color: var(--text-dim);
  }
  .nav-links li a.active { color: var(--accent); }
  .nav-links li a::after { display: none; }
}

/* ── PRINT ── */
@media print {
  nav, .back-to-top, #cursor-glow, body::before,
  .hero-cta, .skip-link { display: none !important; }
  .contact-actions { flex-direction: column; gap: 4pt; }
  .contact-actions a { background: none !important; color: #444 !important; border: none !important; padding: 0 !important; min-height: auto !important; font-size: 10pt; }
  .footer-links a { color: #444; }
  html { scroll-padding-top: 0; }
  body { background: #fff; color: #111; font-size: 11pt; line-height: 1.5; }
  .fade { opacity: 1; transform: none; }
  .hero-name .char { opacity: 1; transform: none; animation: none; }
  section { padding: 24pt 0; }
  section + section { border-top: 0.5pt solid #ddd; }
  .container { padding: 0; max-width: 100%; }
  .hero-name { color: #111; font-size: 32pt; }
  .hero-title { color: #555; }
  .hero-sub { color: #444; max-width: 100%; }
  .section-label { color: #888; }
  .stat-num, .tl-company, .edu-school, .hi { color: #444; }
  .stats { background: #eee; border-color: #ccc; }
  .stat { background: #f5f5f5; }
  .stat-label, .tl-date, .tl-points li, .about-text, .proj-desc { color: #444; }
  .tl-line { background: #ccc; }
  .tl-line::before { background: #888; box-shadow: none; }
  .project-card, .edu-card { background: #f9f9f9; border-color: #ddd; }
  .skill-tag { background: #f0f0f0; border-color: #ddd; color: #444; }
  .skill-tag.primary { background: #ece8de; border-color: #c9a96e; color: #7a6030; }
  .contact-inner p { color: #444; }
  footer { border-top-color: #ddd; }
  .footer-bottom { color: #888; }
  a { color: inherit; text-decoration: none; }
  .badge-dot { box-shadow: none; animation: none; background: #4caf7d; }
  .tl-impact { background: #f5f5f5; border-color: #ddd; }
  .tl-impact-item strong { color: #7a6030; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .fade { opacity: 1; transform: none; transition: none; }
  .hero-name .char { opacity: 1; transform: none; animation: none; }
  .badge-dot { animation: none; }
  #cursor-glow { display: none; }
  .progress-bar { transition: none; }
  .nav-links a::after { transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
