:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --border: rgba(255, 255, 255, 0.06);
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --accent: #22c55e;
  --accent-dim: rgba(34, 197, 94, 0.1);
  --radius: 12px;
}

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

html { scroll-behavior: smooth; font-size: 100%; }

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

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.nav-links { display: flex; gap: 28px; align-items: center; }

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ---- Hero ---- */
.hero {
  padding: 80px 0 64px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-photo {
  width: 160px;
  height: 160px;
  border-radius: 20px;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.hero-content { flex: 1; }

.hero-name {
  font-size: 2.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.hero-links { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.2s;
}

.hero-links a:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-dim);
}


/* ---- Section ---- */
.section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
  max-width: 600px;
}

/* ---- Project Cards ---- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s, transform 0.25s;
}

.project-card:hover {
  border-color: rgba(34, 197, 94, 0.3);
  transform: translateY(-2px);
}

.project-card.featured {
  border-color: rgba(34, 197, 94, 0.15);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(34, 197, 94, 0.03) 100%);
}

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.project-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-tags span {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.project-links { display: flex; gap: 12px; flex-wrap: wrap; }

.project-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  transition: all 0.2s;
}

.project-links a:hover { background: var(--accent-dim); }

/* Earlier projects grid */
.earlier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.earlier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}

.earlier-card:hover { border-color: rgba(255, 255, 255, 0.12); }

.earlier-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.earlier-card .year {
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.earlier-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.55;
}

.earlier-card .earlier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.earlier-card .earlier-tags span {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-muted);
}

/* ---- Skills ---- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.skill-group h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}

.skill-group p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* ---- Experience ---- */
.exp-list { display: flex; flex-direction: column; gap: 20px; }

.exp-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.exp-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.exp-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.exp-item ul { list-style: none; padding: 0; }

.exp-item li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0 4px 16px;
  position: relative;
}

.exp-item li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

/* ---- Education ---- */
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.edu-card h3 { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.edu-card .edu-meta { font-size: 0.88rem; color: var(--accent); margin-bottom: 10px; }
.edu-card p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.55; }

/* ---- Contact ---- */
.contact-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-row a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.contact-row a:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- Resume Page ---- */
.resume-hero {
  text-align: center;
  padding: 56px 0 40px;
}

.resume-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.resume-hero p { color: var(--text-muted); font-size: 0.95rem; }

.resume-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 0.92rem;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover { opacity: 0.85; color: #000; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--text);
}

.pdf-embed-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
}

.pdf-embed-wrapper iframe {
  width: 100%;
  height: 800px;
  border: none;
  display: block;
}

.pdf-fallback {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.resume-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.resume-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
}

.resume-tab:hover { color: var(--text); }

.resume-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.resume-view { display: none; }
.resume-view.active { display: block; }

.resume-section { margin-bottom: 36px; }

.resume-section h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.resume-section h3 {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 2px;
}

.resume-section .meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.resume-section ul {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
}

.resume-section li {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 3px 0 3px 14px;
  position: relative;
}

.resume-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
}

.resume-section p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 12px;
}

/* ---- About / Fun Page ---- */
.about-hero {
  padding: 56px 0 32px;
  text-align: center;
}

.about-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.about-hero p {
  color: var(--text-muted);
  font-size: 1rem;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.fact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.fact-icon {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.fact-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.photo-grid figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.photo-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.photo-grid figure:hover img { transform: scale(1.03); }

.photo-grid figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  max-width: 560px;
  margin: 0 auto;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.cta-box {
  text-align: center;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cta-box p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 16px;
}

/* ---- Page Header (reusable) ---- */
.page-header {
  padding: 56px 0 32px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
}

/* ---- Divider ---- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 48px 0 32px;
  }
  .hero-photo { width: 120px; height: 120px; }
  .hero-desc { max-width: 100%; }
  .hero-links { justify-content: center; }
  .hero-name { font-size: 2rem; }

  .nav-links { display: none; gap: 0; flex-direction: column; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
  }
  .nav-links.open a { padding: 8px 0; }
  .nav-toggle { display: block; }

  .skills-grid { grid-template-columns: 1fr 1fr; }
  .contact-row { flex-direction: column; }
  .earlier-grid { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid img { height: 160px; }
  .pdf-embed-wrapper iframe { height: 500px; }
}
