:root {
  --bg: #0f0f10;
  --bg-alt: #161618;
  --bg-card: #1c1c1f;
  --text: #ededee;
  --text-muted: #9a9a9f;
  --text-dim: #6b6b70;
  --accent: #d4ff4f;
  --accent-soft: rgba(212, 255, 79, 0.12);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --radius: 14px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --max-w: 1100px;
}

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

html { scroll-behavior: smooth; }

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

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 10000;
  width: 0%;
  transition: width 0.1s;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  transition: all 0.3s ease;
}
.nav.scrolled {
  background: rgba(15, 15, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 14px 40px;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.5px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  border: 1px solid var(--border-strong);
  padding: 8px 20px;
  border-radius: 100px;
  color: var(--text) !important;
}
.nav-cta:hover { background: var(--accent); color: var(--bg) !important; border-color: var(--accent); }
.nav-cta::after { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 60px;
  position: relative;
}
.hero-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}
.hero-eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 110px);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.hero-tagline {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 460px;
  margin-bottom: 36px;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212, 255, 79, 0.25);
}
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}
.hero-image {
  display: flex;
  justify-content: center;
}
.portrait-frame {
  position: relative;
  width: 340px;
  height: 340px;
}
.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  filter: grayscale(20%) contrast(1.05);
  position: relative;
  z-index: 2;
}
.portrait-accent {
  position: absolute;
  top: 16px; left: 16px;
  width: 100%; height: 100%;
  border: 2px solid var(--accent);
  border-radius: 20px;
  z-index: 1;
  transition: all 0.4s ease;
}
.portrait-frame:hover .portrait-accent {
  top: 24px; left: 24px;
}
.hero-scroll {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
}
.hero-scroll svg { opacity: 0.5; animation: bob 2s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Sections */
.section {
  padding: 120px 0;
  position: relative;
}
.section-alt {
  background: var(--bg-alt);
}
.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 60px;
  max-width: 700px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: start;
}
.about-body p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 17px;
}
.about-stats {
  display: flex;
  gap: 48px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-suffix {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--accent);
  display: inline;
}
.stat-label {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 1px;
  background: var(--border-strong);
}
.timeline-item {
  position: relative;
  padding-bottom: 48px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -32px; top: 6px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  z-index: 2;
}
.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
}
.timeline-content:hover {
  border-color: var(--border-strong);
  transform: translateX(4px);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.timeline-header h3 {
  font-size: 20px;
  font-weight: 600;
}
.timeline-date {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.timeline-org {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 12px;
}
.timeline-content > p:last-child {
  color: var(--text-muted);
  font-size: 15px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s;
}
.skill-group:hover { border-color: var(--border-strong); }
.skill-group h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 18px;
  font-weight: 600;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  padding: 8px 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(212, 255, 79, 0.2);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  transition: all 0.2s;
}
.tag:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.project-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.project-card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}
.project-card p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
  flex-grow: 1;
}
.project-tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.project-tech span {
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Contact */
.contact-wrap {
  max-width: 640px;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.contact-sub {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  padding: 16px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.25s;
}
.contact-link svg { color: var(--accent); flex-shrink: 0; }
.contact-link:hover {
  border-color: var(--accent);
  background: var(--bg-card);
  transform: translateX(6px);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

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

/* Responsive */
@media (max-width: 860px) {
  .nav { padding: 16px 24px; }
  .nav.scrolled { padding: 12px 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; right: 0;
    background: var(--bg-alt);
    padding: 24px;
    gap: 20px;
    border: 1px solid var(--border);
    border-radius: 0 0 0 16px;
    min-width: 200px;
  }
  .hero { padding: 100px 24px 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-image { order: -1; }
  .portrait-frame { width: 240px; height: 240px; }
  .container { padding: 0 24px; }
  .section { padding: 80px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-stats { gap: 32px; }
  .stat-num, .stat-suffix { font-size: 36px; }
}
