/* ─── Reset & Tokens ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080808;
  --surface: #111111;
  --surface-2: #181818;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.14);
  --text: #ede8e0;
  --text-muted: #6b6560;
  --text-dim: #3a3730;
  --accent: #d4714a;
  --accent-glow: rgba(212, 113, 74, 0.15);
  --accent-soft: rgba(212, 113, 74, 0.08);
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 900px;
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

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

/* ─── Texture & Ambiance ──────────────────────────────────────── */
.noise {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 999;
}

.glow-orb {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(212,113,74,0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Nav ─────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: rgba(8,8,8,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--text); }

/* ─── Reveal Animations ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-section {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-section.visible { opacity: 1; transform: translateY(0); }

/* ─── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 120px 40px 80px;
  max-width: var(--max-w);
  margin: 0 auto;
  z-index: 1;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-name {
  font-size: clamp(56px, 9vw, 96px);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 28px;
  transition-delay: 0.2s;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 48px;
  transition-delay: 0.3s;
}

/* ─── Terminal ────────────────────────────────────────────────── */
.terminal {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 60px;
  transition-delay: 0.4s;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.terminal-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-muted);
  margin-right: 40px;
}

.terminal-body {
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  min-height: 52px;
  display: flex;
  align-items: center;
}

.prompt { color: var(--accent); }

#typed { color: var(--text); }

.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ─── Scroll CTA ──────────────────────────────────────────────── */
.scroll-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition-delay: 0.5s;
  transition: color 0.2s;
}

.scroll-cta:hover { color: var(--text); }

.scroll-cta svg {
  animation: bounce 2s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ─── About ───────────────────────────────────────────────────── */
.about {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 40px;
  border-top: 1px solid var(--border);
  z-index: 1;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 48px;
  align-items: start;
}

.about-label {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 4px;
}

.about-text p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-text p strong {
  color: var(--text);
  font-weight: 500;
}

/* ─── Projects ────────────────────────────────────────────────── */
.projects {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px 120px;
  position: relative;
  z-index: 1;
}

.projects-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.projects-header h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ─── Project Card ────────────────────────────────────────────── */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 32px;
  align-items: start;
  padding: 36px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition),
              background var(--transition),
              transform var(--transition);
  cursor: default;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-soft);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.project-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.project-card:hover::before { opacity: 1; }

.project-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-top: 4px;
}

.project-num {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.project-tags {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-tags .tag {
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(212,113,74,0.2);
  padding: 3px 8px;
  border-radius: 100px;
  white-space: nowrap;
}

.project-body { flex: 1; }

.project-name {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.project-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 20px;
}

.project-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-chips span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 100px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  align-self: flex-start;
  margin-top: 4px;
}

.project-link:hover {
  color: var(--accent);
  border-color: rgba(212,113,74,0.3);
  background: var(--accent-soft);
}

/* ─── Footer ──────────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px 40px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 700px) {
  nav { padding: 16px 20px; }

  .hero { padding: 100px 20px 60px; }

  .about { padding: 60px 20px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .projects { padding: 0 20px 80px; }

  .project-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 20px;
  }

  .project-meta {
    flex-direction: row;
    align-items: center;
  }

  .project-tags { flex-direction: row; }

  .project-link { align-self: flex-start; }
}
