/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  --bg:        #0d0d0d;
  --bg2:       #141414;
  --bg3:       #1c1c1c;
  --border:    #2a2a2a;
  --text:      #e8e4dc;
  --muted:     #888;
  --accent:    #c8f060;
  --accent2:   #f06060;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius:    8px;
  --max-w:     860px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Grain overlay ───────────────────────────────────────────────────────── */
.grain {
  pointer-events: none;
  position: fixed;
  inset: -50%;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' 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)'/%3E%3C/svg%3E");
  opacity: 0.03;
  z-index: 999;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(13,13,13,0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.nav-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-cta {
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  color: var(--text) !important;
  transition: border-color 0.2s, background 0.2s !important;
}
.nav-cta:hover {
  border-color: var(--accent);
  background: rgba(200,240,96,0.06);
}

/* ── Main ────────────────────────────────────────────────────────────────── */
.main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
  animation: fadeUp 0.6s ease both;
}
.hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(200,240,96,0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.hero-name {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 0.6rem;
}
.hero-currently {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}
.hero-bio {
  max-width: 520px;
  color: var(--text);
  opacity: 0.8;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #0d0d0d;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: var(--muted); }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section {
  margin-bottom: 4rem;
  animation: fadeUp 0.6s ease both;
}
.section-title {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ── Skills ──────────────────────────────────────────────────────────────── */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.skill-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  transition: border-color 0.2s, color 0.2s;
}
.skill-pill:hover { border-color: var(--accent); color: var(--accent); }

/* ── Timeline ────────────────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 2rem; }
.timeline-item {
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px; top: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}
.timeline-company { font-weight: 500; }
.timeline-duration { color: var(--muted); font-size: 0.82rem; }
.timeline-role { color: var(--accent); font-size: 0.85rem; margin-bottom: 0.4rem; }
.timeline-desc { color: var(--muted); font-size: 0.88rem; }

/* ── Social cards ────────────────────────────────────────────────────────── */
.social-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.social-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  transition: border-color 0.2s, transform 0.2s;
}
.social-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.social-icon {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--accent);
}

/* ── Page hero ───────────────────────────────────────────────────────────── */
.page-hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
  animation: fadeUp 0.5s ease both;
}
.page-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.4rem;
}
.page-hero p { color: var(--muted); }

/* ── Projects grid ───────────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}
.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.7rem;
}
.project-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
}
.project-links { display: flex; gap: 0.8rem; color: var(--muted); font-size: 1.1rem; }
.project-links a:hover { color: var(--accent); }
.project-desc { color: var(--muted); font-size: 0.87rem; margin-bottom: 1rem; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Hobbies grid ────────────────────────────────────────────────────────── */
.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}
.hobby-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.hobby-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.hobby-icon { font-size: 2rem; display: block; margin-bottom: 0.8rem; }
.hobby-name {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.hobby-desc { color: var(--muted); font-size: 0.85rem; }

/* ── Certificates ────────────────────────────────────────────────────────── */
.certs-grid { display: flex; flex-direction: column; gap: 1rem; }
.cert-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  transition: border-color 0.2s;
}
.cert-card:hover { border-color: var(--accent); }
.cert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}
.cert-title { font-family: var(--font-head); font-weight: 700; }
.cert-verify { color: var(--accent); font-size: 0.82rem; }
.cert-verify:hover { text-decoration: underline; }
.cert-issuer { color: var(--muted); font-size: 0.85rem; margin-bottom: 0.3rem; }
.cert-date {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── Achievements ────────────────────────────────────────────────────────── */
.achievements-list { display: flex; flex-direction: column; gap: 0.6rem; }
.achievements-list li {
  padding-left: 1.2rem;
  position: relative;
  color: var(--text);
  opacity: 0.85;
}
.achievements-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  color: var(--muted);
  font-size: 0.88rem;
  border: 1px dashed var(--border);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
}

/* ── Error page ──────────────────────────────────────────────────────────── */
.error-page {
  text-align: center;
  padding: 6rem 0;
}
.error-code {
  font-family: var(--font-head);
  font-size: 8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--border);
  margin-bottom: 1rem;
}
.error-page h1 { font-family: var(--font-head); font-size: 1.8rem; margin-bottom: 0.5rem; }
.error-page p { color: var(--muted); margin-bottom: 2rem; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a:hover { color: var(--text); }

/* ── Animation ───────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.78rem; }
  .hero { padding: 2.5rem 0 2rem; }
  .footer { flex-direction: column; text-align: center; }
}

.cert-image {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

/* ── Hero photo ───────────────────────────────────────────────────────────── */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}
.hero-text { flex: 1; }
.hero-photo {
  flex-shrink: 0;
}
.hero-photo img {
  width: 180px;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  border: 2px solid var(--border);
  filter: grayscale(20%);
  transition: filter 0.3s, border-color 0.3s;
}
.hero-photo img:hover {
  filter: grayscale(0%);
  border-color: var(--accent);
}

@media (max-width: 600px) {
  .hero-content {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .hero-photo img {
    width: 120px;
  }
}

/* ── Hobby images ─────────────────────────────────────────────────────────── */
.hobby-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
}

.hobby-images a {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1a1a1a;        /* ← fills empty space around image */
  aspect-ratio: 3 / 4;        /* ← same shape for all cells */
}

.hobby-images img {
  width: 100%;
  height: 100%;
  object-fit: contain;        /* ← no cropping */
  display: block;
  transition: transform 0.3s, opacity 0.3s;
}

.hobby-images a:hover img {
  transform: scale(1.05);
  opacity: 0.85;
}
.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));  /* ← was 220px */
  gap: 1.2rem;
}