:root {
  --bg: #0d1117;
  --bg-alt: #111823;
  --surface: #161d29;
  --surface-hover: #1c2534;
  --border: #263043;
  --text: #e6edf5;
  --text-muted: #9aa7ba;
  --accent: #5eead4;
  --accent-2: #38bdf8;
  --accent-glow: rgba(94, 234, 212, 0.12);
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #04141a; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.5px; }
.brand-dot { color: var(--accent); }
.nav { display: flex; gap: 2rem; }
.nav a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.2s; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.25s;
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

.hero {
  min-height: 100vh; display: flex; align-items: center;
  background:
    radial-gradient(ellipse 60% 50% at 75% 20%, var(--accent-glow), transparent 70%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(56, 189, 248, 0.08), transparent 70%),
    var(--bg);
  position: relative;
}
.hero-inner { padding-block: 120px 80px; }
.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: 3px; font-size: 0.85rem; margin-bottom: 16px; }
.hero-name { font-size: clamp(3rem, 9vw, 6rem); line-height: 1.05; letter-spacing: -3px; font-weight: 800; }
.accent { color: var(--accent); }
.hero-role { font-size: clamp(1.4rem, 3.5vw, 2.1rem); color: var(--text-muted); font-weight: 400; margin-top: 8px; }
.hero-desc { max-width: 620px; color: var(--text-muted); font-size: 1.05rem; margin-top: 28px; }
.hero-actions { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }
.btn { padding: 13px 28px; border-radius: 8px; font-weight: 600; font-size: 0.95rem; transition: 0.2s; display: inline-block; }
.btn-primary { background: var(--accent); color: #04141a; }
.btn-primary:hover { background: #7df0dd; transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.scroll-hint {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 40px; border: 2px solid var(--border); border-radius: 14px; display: flex; justify-content: center;
}
.scroll-hint span { width: 3px; height: 8px; background: var(--accent); border-radius: 2px; margin-top: 8px; animation: scroll 1.6s infinite; }
@keyframes scroll { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

.section { padding-block: 110px; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 56px; }
.section-index { color: var(--accent); font-family: ui-monospace, monospace; font-size: 0.9rem; font-weight: 600; letter-spacing: 2px; }
.section-head h2 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -1px; margin-top: 6px; }
.section-sub { color: var(--text-muted); margin-top: 12px; max-width: 620px; }
.underline { width: 60px; height: 3px; background: var(--accent); margin-top: 22px; border-radius: 2px; }

.about-grid { display: grid; grid-template-columns: 240px 1fr; gap: 60px; align-items: start; }
.about-avatar {
  width: 220px; height: 220px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; font-weight: 800; color: #04141a;
  box-shadow: 0 0 0 8px var(--surface), 0 20px 60px rgba(94, 234, 212, 0.15);
}
.about-text p { color: var(--text-muted); margin-bottom: 20px; font-size: 1.05rem; }
.about-text p:last-child { color: var(--text); }

.skills-grid, .projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.skill-card, .project-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 32px; transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.skill-card:hover, .project-card:hover { transform: translateY(-6px); border-color: var(--accent); background: var(--surface-hover); }
.skill-icon, .project-icon { font-size: 2rem; margin-bottom: 16px; }
.skill-card h3, .project-card h3 { font-size: 1.3rem; margin-bottom: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  background: var(--bg); border: 1px solid var(--border); color: var(--text-muted);
  padding: 5px 12px; border-radius: 999px; font-size: 0.82rem;
}
.project-card p { color: var(--text-muted); margin-bottom: 22px; font-size: 0.96rem; }
.project-links { display: flex; gap: 24px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); }
.project-links a { color: var(--accent); font-size: 0.9rem; font-weight: 600; transition: opacity 0.2s; }
.project-links a:hover { opacity: 0.7; }

.contact-inner { text-align: center; }
.contact-inner .section-head { display: inline-block; text-align: left; }
.contact-inner .section-sub { margin-inline: auto; }
.contact-email {
  display: inline-block; font-size: clamp(1.3rem, 4vw, 2rem); color: var(--accent);
  font-weight: 600; margin-top: 20px; padding-bottom: 6px;
  border-bottom: 2px solid transparent; transition: border-color 0.2s;
}
.contact-email:hover { border-color: var(--accent); }
.social-links { display: flex; gap: 28px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.social-links a { color: var(--text-muted); font-weight: 500; transition: color 0.2s; }
.social-links a:hover { color: var(--accent); }

.site-footer { border-top: 1px solid var(--border); padding-block: 32px; text-align: center; }
.site-footer p { color: var(--text-muted); font-size: 0.9rem; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 760px) {
  .container { width: min(100% - 36px, var(--maxw)); }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 12px 20px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .about-avatar { margin-inline: auto; }
  .section { padding-block: 80px; }
  .hero { min-height: auto; }
  .hero-inner { padding-block: 140px 100px; }
  .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
