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

:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fc;
  --bg-card: #f0f1f7;
  --bg-code: #1a1a2e;
  --border: #e4e5f0;
  --text: #0f0f1a;
  --text-muted: #6b6b8a;
  --accent: #5b5bd6;
  --accent-hover: #4747c2;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav ul a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

nav ul a:hover {
  color: var(--text);
}

/* HERO */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 8rem 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
}

.hero-greeting {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.hero-role {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.divider {
  margin: 0 0.5rem;
  opacity: 0.4;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-desc a {
  color: var(--accent);
  transition: color 0.2s;
}

.hero-desc a:hover {
  color: var(--accent-hover);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

/* CODE WINDOW */
.hero-code {
  flex: 1;
  max-width: 420px;
}

.code-window {
  background: var(--bg-code);
  border: 1px solid #2a2a3e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

.code-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1rem;
  background: #141425;
  border-bottom: 1px solid #2a2a3e;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: var(--red); }
.dot.yellow { background: var(--yellow); }
.dot.green { background: var(--green); }

.code-filename {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #6e6e8a;
  margin-left: 0.5rem;
}

.code-window pre {
  padding: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.9;
  overflow-x: auto;
}

.c-keyword { color: #c792ea; }
.c-var { color: #82aaff; }
.c-string { color: #c3e88d; }
.c-prop { color: #f07178; }
.c-punctuation { color: #6e6e8a; }

/* SECTIONS */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-title {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 2.5rem;
}

/* ABOUT */
#about {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.975rem;
  line-height: 1.8;
}

.about-text strong {
  color: var(--text);
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all 0.2s;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.profile-link:hover {
  color: var(--text);
  border-color: var(--accent);
}

.profile-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* EXPERIENCE */
#experience {
  border-top: 1px solid var(--border);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-meta {
  padding-top: 0.2rem;
}

.timeline-period {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.timeline-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.company-link {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 500;
  transition: color 0.2s;
}

.company-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.timeline-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* SKILLS */
#skills {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}

.skill-group h3 {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-weight: 500;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags span {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* CONTACT */
#contact {
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact-desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-alt);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  #hero {
    flex-direction: column;
    padding-top: 6rem;
  }

  .hero-code {
    max-width: 100%;
    width: 100%;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  nav ul {
    gap: 1.25rem;
  }
}
