/* ══════════════════════════════════════════
   CSS Variables & Reset
   ══════════════════════════════════════════ */
:root {
  /* Accent palette – modern violet/cyan */
  --accent:        #a78bfa;
  --accent-bright: #c4b5fd;
  --accent-glow:   rgba(167, 139, 250, .25);
  --cyan:          #22d3ee;
  --cyan-glow:     rgba(34, 211, 238, .18);

  /* Surface & text */
  --bg:            #0b0f1a;
  --bg-elevated:   #111827;
  --bg-card:       #1a2234;
  --bg-card-hover: #1e293b;
  --border:        #1e293b;
  --border-hover:  #334155;
  --text:          #e2e8f0;
  --text-muted:    #94a3b8;
  --text-heading:  #f1f5f9;

  /* Spacing */
  --sp-xs:  .25rem;
  --sp-sm:  .5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-4xl: 6rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Typography */
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Transitions */
  --transition:  .25s cubic-bezier(.4, 0, .2, 1);

  /* Container */
  --container:   1120px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-bright); }
ul { list-style: none; }

/* ══════════════════════════════════════════
   Google Fonts
   ══════════════════════════════════════════ */
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-v20-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-v20-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-v20-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-v24-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-v24-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono-v24-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

/* ══════════════════════════════════════════
   Container
   ══════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

/* ══════════════════════════════════════════
   Navigation
   ══════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(11, 15, 26, .8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.navbar.scrolled { border-bottom-color: var(--border); }

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  letter-spacing: .05em;
}
.nav-logo:hover { color: var(--accent-bright); }

.nav-links {
  display: flex;
  gap: var(--sp-lg);
}
.nav-links a {
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  padding: var(--sp-xs) 0;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg-elevated);
    flex-direction: column;
    align-items: center;
    padding: var(--sp-xl) 0;
    gap: var(--sp-lg);
    transform: translateY(-120%);
    transition: transform .35s ease;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { transform: translateY(0); }
}

/* ══════════════════════════════════════════
   Sections (shared)
   ══════════════════════════════════════════ */
.section {
  padding: var(--sp-4xl) 0;
}
.section--alt {
  background: var(--bg-elevated);
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: var(--sp-md);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 2px;
  margin-top: var(--sp-sm);
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: var(--sp-2xl);
}
.section-intro {
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: var(--sp-2xl);
  font-size: .95rem;
  line-height: 1.8;
}

/* ══════════════════════════════════════════
   Hero
   ══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(64px + var(--sp-3xl)) var(--sp-lg) var(--sp-3xl);
  position: relative;
  overflow: hidden;
}

/* Ambient glow */
.hero::before {
  content: '';
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-image-wrapper {
  margin-bottom: var(--sp-xl);
}
.hero-image-placeholder {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 2px solid var(--border-hover);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hero-image-placeholder:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}
.hero-image-placeholder svg { width: 56px; height: 56px; }

.hero-name {
  font-size: clamp(2.5rem, 7vw, 2.5rem);
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: var(--sp-sm);
}
.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(.9rem, 2vw, 1.1rem);
  color: var(--accent);
  font-weight: 500;
  margin-bottom: var(--sp-xl);
}
.hero-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto var(--sp-lg);
  line-height: 1.8;
}
.hero-focus {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-xl);
}
.typewriter {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-weight: 600;
}
.cursor {
  color: var(--cyan);
  font-weight: 300;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

.hero-credo {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-heading);
  font-style: italic;
  margin-bottom: var(--sp-md);
  position: relative;
  padding: var(--sp-md) var(--sp-lg);
  border-left: 3px solid var(--accent);
  background: rgba(167, 139, 250, .06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.hero-credit {
  color: var(--text-muted);
  font-size: .85rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}
.hero-credit strong { color: var(--accent); }

.scroll-indicator {
  position: absolute;
  bottom: var(--sp-xl);
  left: 50%; transform: translateX(-50%);
  color: var(--text-muted);
  animation: floatDown 2s ease-in-out infinite;
}
@keyframes floatDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ══════════════════════════════════════════
   Tech-Stack Badges
   ══════════════════════════════════════════ */
.tech-category {
  margin-bottom: var(--sp-2xl);
}
.tech-category-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--sp-md);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.badge-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  transition: var(--transition);
  cursor: default;
}
.badge::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

/* Badge color dots */
.badge[data-color="cpp"]::before      { background: #00599C; }
.badge[data-color="csharp"]::before   { background: #68217A; }
.badge[data-color="php"]::before      { background: #777BB4; }
.badge[data-color="perl"]::before     { background: #39457E; }
.badge[data-color="sql"]::before      { background: #336791; }
.badge[data-color="js"]::before       { background: #F7DF1E; }
.badge[data-color="html"]::before     { background: #E34F26; }
.badge[data-color="css"]::before      { background: #1572B6; }
.badge[data-color="md"]::before       { background: #083FA3; }
.badge[data-color="yaml"]::before     { background: #CB171E; }
.badge[data-color="git"]::before      { background: #F05032; }
.badge[data-color="docker"]::before   { background: #2496ED; }
.badge[data-color="n8n"]::before      { background: #FF6D5A; }
.badge[data-color="vscode"]::before   { background: #007ACC; }
.badge[data-color="claude"]::before   { background: var(--accent); }
.badge[data-color="obsidian"]::before { background: #7C3AED; }
.badge[data-color="comfyui"]::before  { background: #8B5CF6; }
.badge[data-color="ollama"]::before   { background: #4F46E5; }
.badge[data-color="ps"]::before       { background: #31A8FF; }
.badge[data-color="davinci"]::before  { background: #E53935; }
.badge[data-color="obs"]::before      { background: #302E31; }

/* ══════════════════════════════════════════
   Showcase Cards
   ══════════════════════════════════════════ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: var(--sp-xl);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.card:hover::before { opacity: 1; }

.card-header {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--accent);
  flex-shrink: 0;
}
.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
}
.card-tagline {
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 500;
}
.card-desc {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.7;
}
.card-meta {
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--border);
}
.card-vibe {
  font-size: .8rem;
  color: var(--text-muted);
  font-style: italic;
}
.card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}
.mini-badge {
  font-size: .7rem;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(167, 139, 250, .1);
  color: var(--accent-bright);
  border: 1px solid rgba(167, 139, 250, .2);
}
.card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: var(--sp-sm);
  border-top: 1px solid var(--border);
}
.card-link:hover { color: var(--accent-bright); }
.card-link svg { transition: transform var(--transition); }
.card-link:hover svg { transform: translate(2px, -2px); }

/* ══════════════════════════════════════════
   Timeline
   ══════════════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: 40px;
  margin-top: var(--sp-xl);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 11px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--cyan), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--sp-2xl);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-marker {
  position: absolute;
  left: -40px; top: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
  z-index: 1;
}
.timeline-marker::after {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transition: var(--transition);
}
.timeline-item:hover .timeline-marker {
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--accent-glow);
  transform: scale(1.15);
}
.timeline-item:hover .timeline-marker::after {
  background: var(--cyan);
}
.timeline-item--major .timeline-marker {
  border-color: var(--cyan);
  width: 26px; height: 26px;
  left: -42px;
}
.timeline-item--major .timeline-marker::after {
  background: var(--cyan);
  width: 10px; height: 10px;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  transition: var(--transition);
}
.timeline-item:hover .timeline-content {
  border-color: var(--border-hover);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 600;
  color: var(--cyan);
  display: block;
  margin-bottom: var(--sp-xs);
}
.timeline-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--sp-sm);
}
.timeline-text {
  color: var(--text-muted);
  font-size: .875rem;
  line-height: 1.6;
}
.timeline-list {
  list-style: none;
  padding: 0;
  margin-top: var(--sp-sm);
}
.timeline-list li {
  color: var(--text-muted);
  font-size: .85rem;
  line-height: 1.7;
  padding-left: var(--sp-md);
  position: relative;
}
.timeline-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ══════════════════════════════════════════
   Fun Facts
   ══════════════════════════════════════════ */
.fun-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--sp-lg);
}

.fun-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  text-align: center;
  transition: var(--transition);
}
.fun-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.fun-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: var(--sp-md);
}
.fun-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: var(--sp-sm);
}
.fun-text {
  color: var(--text-muted);
  font-size: .85rem;
  line-height: 1.7;
}

/* ══════════════════════════════════════════
   Footer / Contact
   ══════════════════════════════════════════ */
.footer {
  padding: var(--sp-4xl) 0 var(--sp-xl);
  text-align: center;
  background: var(--bg);
}
.footer .section-title { display: block; text-align: center; }
.footer .section-title::after { margin: var(--sp-sm) auto 0; }

.footer-intro {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: var(--sp-2xl);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-3xl);
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-lg);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: .875rem;
  font-weight: 500;
  transition: var(--transition);
}
.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: rgba(167, 139, 250, .06);
  box-shadow: 0 0 20px var(--accent-glow);
}
.contact-link svg { flex-shrink: 0; }

.footer-copy {
  color: var(--text-muted);
  font-size: .75rem;
  opacity: .6;
}

/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */
@media (max-width: 600px) {
  .hero-name { font-size: 2.2rem; }
  .hero-credo { font-size: .95rem; }
  .card-grid { grid-template-columns: 1fr; }
  .fun-grid  { grid-template-columns: 1fr; }
  .timeline  { padding-left: 32px; }
  .timeline-marker { left: -32px; }
  .timeline-item--major .timeline-marker { left: -34px; }
  .section    { padding: var(--sp-3xl) 0; }
}

/* ══════════════════════════════════════════
   Scrollbar
   ══════════════════════════════════════════ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════════════════
   Selection
   ══════════════════════════════════════════ */
::selection {
  background: var(--accent);
  color: var(--bg);
}
