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

:root {
  --bg:       #0a0a0b;
  --surface:  #111113;
  --border:   #1e1e22;
  --text:     #e8e8ec;
  --muted:    #5a5a68;
  --accent:   #4f8cff;
  --accent2:  #a78bfa;
  --hover-bg: #16161a;
}

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1.5rem;
}

.page.center { justify-content: center; }

/* NAV BACK */
.nav-back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--accent); }

/* WORDMARK */
.wordmark {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: -0.04em;
  color: var(--text);
}
.wordmark span { color: var(--accent); }

.tagline {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 1.2rem auto 0;
}

/* HOME GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  width: 100%;
  max-width: 900px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.card {
  background: var(--surface);
  padding: 2rem 1.6rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: background 0.2s ease;
  animation: fadeUp 0.5s ease both;
}
.card:hover { background: var(--hover-bg); }
.card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.card:hover::after { transform: scaleX(1); }
.card.disabled { opacity: 0.4; pointer-events: none; cursor: default; }

.card .arrow {
  position: absolute;
  top: 1.4rem; right: 1.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  transition: transform 0.2s ease, color 0.2s ease;
}
.card:hover .arrow { transform: translate(2px, -2px); color: var(--accent); }

.icon { font-size: 1.5rem; line-height: 1; }

.card-label {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.card-desc { font-size: 0.7rem; color: var(--muted); line-height: 1.5; }
.card-url {
  font-size: 0.62rem;
  color: var(--border);
  margin-top: auto;
  padding-top: 0.5rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.card:hover .card-url { color: var(--muted); }

.card:nth-child(1) { animation-delay: 0.08s; }
.card:nth-child(2) { animation-delay: 0.14s; }
.card:nth-child(3) { animation-delay: 0.20s; }
.card:nth-child(4) { animation-delay: 0.26s; }
.card:nth-child(5) { animation-delay: 0.32s; }
.card:nth-child(6) { animation-delay: 0.38s; }
.card:nth-child(7) { animation-delay: 0.44s; }

/* CONTENT PAGES */
.content-wrap {
  width: 100%;
  max-width: 780px;
  animation: fadeUp 0.5s ease both;
}

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.page-sub {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* RESUME */
.resume-section { margin-bottom: 2.2rem; }

.section-label {
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.resume-summary {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.8;
}

.job {
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.8rem;
  background: var(--surface);
}

.job-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.job-meta {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.2rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}

.job ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.job ul li {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}

.job ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.skill-pill {
  font-size: 0.7rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface);
  line-height: 1.4;
}

.skill-pill strong {
  display: block;
  color: var(--text);
  font-size: 0.68rem;
  margin-bottom: 0.15rem;
}

.edu-item {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.edu-item:last-child { border-bottom: none; }
.edu-item strong { color: var(--text); }

/* ABOUT */
.about-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: white;
  margin-bottom: 1.2rem;
  flex-shrink: 0;
}

.about-bio {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1rem;
}

.about-links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  transition: border-color 0.2s, color 0.2s;
  letter-spacing: 0.04em;
}
.about-link:hover { border-color: var(--accent); color: var(--accent); }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}
.tag {
  font-size: 0.62rem;
  padding: 0.3rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* FOOTER */
footer {
  margin-top: 3rem;
  font-size: 0.62rem;
  color: var(--border);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ANIMATIONS */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

header { animation: fadeDown 0.6s ease both; }

@media (max-width: 500px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
}
