/* ============================================================
   Homepage — Style Sheet
   Theme: Light · Minimal · Space-accented
   ============================================================ */

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:          #f7f8fc;
  --bg-glass:    rgba(247, 248, 252, 0.82);
  --surface:     #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-section: rgba(247, 248, 252, 0.78);
  --border:      rgba(0, 0, 0, 0.08);
  --text:        #0d1117;
  --muted:       #6b7280;
  --accent:      #1a6cff;
  --accent-glow: rgba(26, 108, 255, 0.25);
  --accent2:     #00c9b1;
  --danger:      #e53e3e;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --radius:       12px;
  --radius-lg:    20px;
  --shadow:       0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg:    0 12px 48px rgba(0,0,0,0.12);
  --nav-h:        64px;
  --max-w:        1100px;
  --section-gap:  120px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── 3D Canvas ──────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#bg-canvas.ready { opacity: 1; }

/* ── Navigation ─────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
#nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--accent); }

/* ── Shared section layout ───────────────────────────────── */
/*
 * Sections are transparent — the fixed canvas shows through.
 * Each .section-inner gets a frosted-glass panel so text stays
 * readable over whatever 3D content is behind it.
 */
section {
  position: relative;
  z-index: 1;
  /* No background here — let the canvas show through */
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--section-gap) 2rem;
  /* Frosted glass backdrop for readability */
  background: var(--bg-glass-section);
  backdrop-filter: blur(3px) saturate(1.3);
  -webkit-backdrop-filter: blur(3px) saturate(1.3);
  border-radius: var(--radius-lg);
  /* Subtle top/bottom margin so canvas peeks between sections */
  margin-top: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 40px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}

/* Hero section: no glass panel — fully transparent to show the 3D scene */
#hero .hero-content {
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
}
#hero {
  /* Override: hero section-inner is not used, hero-content is the layout container */
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  color: var(--text);
}
.section-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* ── Hero ───────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
}

/* Hero section-inner: transparent, no glass */
#hero .section-inner,
#hero > .section-inner {
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
}

.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px var(--accent-glow);
  flex-shrink: 0;
}

.hero-text { flex: 1; }

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s forwards;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-style: italic;
  opacity: 0;
  animation: fadeUp 0.6s 0.3s forwards;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.4s forwards;
}

.hero-location {
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.5s forwards;
}
.location-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 0 3px rgba(0,201,177,0.25);
  animation: pulse-dot 2s infinite;
}

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s 0.6s forwards;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 40px;
  border: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all 0.2s;
}
.icon-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,108,255,0.15);
}
.icon-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.hero-scroll-hint {
  display: flex;
  justify-content: center;
  padding-bottom: 2rem;
  position: relative;
  z-index: 1;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s infinite;
}

/* ── Projects ───────────────────────────────────────────── */
/* Section background removed — handled by .section-inner glass panel */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(26,108,255,0.2);
}
.project-card.featured {
  border-color: rgba(26,108,255,0.18);
  background: linear-gradient(160deg, rgba(255,255,255,0.85) 0%, rgba(240,245,255,0.85) 100%);
}

.project-thumb {
  height: 160px;
  background: linear-gradient(135deg, #e8eeff 0%, #dff5f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-icon-placeholder {
  font-size: 3.5rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
  transition: transform 0.3s;
}
.project-card:hover .project-icon-placeholder {
  transform: scale(1.1) rotate(-4deg);
}
.project-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.04));
}

.project-body {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.project-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.project-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.project-owner {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0.7;
}
.project-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(26,108,255,0.08);
  color: var(--accent);
  border: 1px solid rgba(26,108,255,0.15);
  white-space: nowrap;
}
.project-arrow {
  font-size: 1.1rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.25s;
  align-self: flex-end;
}
.project-card:hover .project-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Skills ─────────────────────────────────────────────── */

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

.skill-group {}
.skill-category {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.skill-list { display: flex; flex-direction: column; gap: 1rem; }

.skill-item {}
.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}
.skill-name {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}
.skill-pct {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.skill-bar-track {
  height: 5px;
  background: rgba(0,0,0,0.07);
  border-radius: 99px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.skill-bar-fill.animated {
  width: var(--pct);
}

/* ── Contact ────────────────────────────────────────────── */

.contact-inner {
  text-align: center;
}
.contact-inner .section-title {
  justify-content: center;
}
.contact-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.contact-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 32px rgba(26,108,255,0.3);
  transition: all 0.25s;
}
.contact-email-btn:hover {
  background: #0f56d6;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(26,108,255,0.4);
}
.btn-arrow {
  font-size: 1.2rem;
  transition: transform 0.2s;
}
.contact-email-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Projects filter bar ────────────────────────────────── */
.projects-filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.4rem 1.1rem;
  border-radius: 40px;
  border: 1px solid var(--border);
  background: var(--surface-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(0,201,177,0.25); }
  50%       { box-shadow: 0 0 0 6px rgba(0,201,177,0.1); }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    padding-top: 4rem;
    gap: 2rem;
  }
  .avatar { width: 90px; height: 90px; }
  .hero-name { font-size: clamp(2.5rem, 10vw, 3.5rem); }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 1.25rem; }
  :root { --section-gap: 80px; }
  .section-inner {
    border-radius: var(--radius);
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
}

/* ── CV download button in nav ──────────────────────────── */
.nav-cv-btn {
  padding: 0.35rem 0.9rem !important;
  border-radius: 40px;
  border: 1px solid var(--accent) !important;
  color: var(--accent) !important;
  font-size: 0.82rem !important;
  transition: all 0.2s;
}
.nav-cv-btn:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

/* ── Hero CV / accent link ──────────────────────────────── */
.icon-link-accent {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
.icon-link-accent:hover {
  background: #0f56d6 !important;
  transform: translateY(-2px);
}

/* ── Timeline (Experience) ──────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  opacity: 0.3;
}
.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}
.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.timeline-body {}
.timeline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}
.timeline-role {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
}
.timeline-company {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.timeline-summary {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ── Education ──────────────────────────────────────────── */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.edu-card {
  background: var(--surface-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.edu-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.edu-period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}
.edu-institution {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.3rem;
}
.edu-degree {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.edu-note {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Contact actions row ────────────────────────────────── */
.contact-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.25s;
}
.contact-cv-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(26,108,255,0.3);
}

/* ── Dark colour theme ──────────────────────────────────── */
[data-color-theme="dark"] {
  --bg:               #0d1117;
  --bg-glass:         rgba(13, 17, 23, 0.82);
  --surface:          #161b22;
  --surface-glass:    rgba(22, 27, 34, 0.75);
  --bg-glass-section: rgba(13, 17, 23, 0.72);
  --border:           rgba(255, 255, 255, 0.08);
  --text:             #e6edf3;
  --muted:            #8b949e;
  --shadow:           0 4px 24px rgba(0, 0, 0, 0.65);
  --shadow-lg:        0 12px 48px rgba(0, 0, 0, 0.6);
}

/* ── Dark theme: project card overrides ─────────────────── */
[data-color-theme="dark"] .project-card {
  background: rgba(28, 33, 40, 0.80);
}
[data-color-theme="dark"] .project-card.featured {
  background: linear-gradient(160deg, rgba(28,33,40,0.85) 0%, rgba(26,34,54,0.85) 100%);
  border-color: rgba(26, 108, 255, 0.28);
}
[data-color-theme="dark"] .project-thumb {
  background: linear-gradient(135deg, #1e2a3a 0%, #162630 100%);
}
[data-color-theme="dark"] .skill-bar-track {
  background: rgba(255, 255, 255, 0.06);
}
[data-color-theme="dark"] .edu-card {
  background: rgba(22, 27, 34, 0.78);
}

/* ── Text legibility over 3D background ─────────────────── */
/* Light theme: faint dark shadow gives contrast over bright bg */
.hero-name,
.hero-eyebrow,
.hero-tagline,
.hero-bio,
.hero-location,
.timeline-role,
.timeline-company,
.timeline-summary {
  text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.4);
}

/* Dark theme: no shadow — text is already light on dark, glass panel is enough */
[data-color-theme="dark"] .hero-name,
[data-color-theme="dark"] .hero-eyebrow,
[data-color-theme="dark"] .hero-tagline,
[data-color-theme="dark"] .hero-bio,
[data-color-theme="dark"] .hero-location,
[data-color-theme="dark"] .timeline-role,
[data-color-theme="dark"] .timeline-company,
[data-color-theme="dark"] .timeline-summary {
  text-shadow: none;
}

/* ── Quote ──────────────────────────────────────────────────
   Append these rules to the end of style.css
   ─────────────────────────────────────────────────────────── */

#quote {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
}

.site-quote {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding: 3rem 8.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-glass-section);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}

.site-quote-mark {
  display: block;
  font-family: var(--font-display);
  font-size: 6rem;
  line-height: 0.6;
  color: var(--accent);
  opacity: 0.25;
  margin-bottom: 1.5rem;
  user-select: none;
}

.site-quote-text {
  /* font-family: var(--font-display); */
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.5;
  overflow: visible;
  color: var(--text);
  letter-spacing: -0.02em;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.site-quote-author {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-style: normal;
}
