/* ===================================================
   Kernella Portfolio — style.css
   Design: Dark premium developer aesthetic
   =================================================== */

/* ---------------------------------------------------
   1. CSS Custom Properties
--------------------------------------------------- */
:root {
  /* Colors – Dark theme (default) */
  --bg:          #0a0a0f;
  --bg-alt:      #0f0f18;
  --bg-card:     #12121e;
  --bg-card-hover: #181827;
  --border:      rgba(255,255,255,0.07);
  --border-accent: rgba(0,255,170,0.25);

  --text:        #e8e8f0;
  --text-muted:  #8888aa;
  --text-dim:    #555577;

  --accent:      #00ffaa;       /* Electric green */
  --accent-2:    #7c6eff;       /* Purple */
  --accent-3:    #00d4ff;       /* Cyan */
  --accent-glow: rgba(0,255,170,0.15);

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

  /* Spacing */
  --gap:    clamp(1rem, 4vw, 2rem);
  --radius: 12px;
  --radius-lg: 20px;

  /* Animation */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.3s var(--ease);

  /* Nav */
  --nav-height: 68px;
}

/* Light theme overrides */
[data-theme="light"] {
  --bg:          #f8f8fc;
  --bg-alt:      #f0f0f8;
  --bg-card:     #ffffff;
  --bg-card-hover: #f5f5ff;
  --border:      rgba(0,0,0,0.08);
  --border-accent: rgba(100,80,220,0.3);

  --text:        #1a1a2e;
  --text-muted:  #555577;
  --text-dim:    #9999bb;

  --accent:      #0077ff;
  --accent-2:    #7c6eff;
  --accent-3:    #0099cc;
  --accent-glow: rgba(0,119,255,0.1);
}

/* ---------------------------------------------------
   2. Reset & Base
--------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), color var(--transition);
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ---------------------------------------------------
   3. Typography
--------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

code, .mono { font-family: var(--font-mono); }

.accent { color: var(--accent); }

/* ---------------------------------------------------
   4. Layout Utilities
--------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 560px;
}

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ---------------------------------------------------
   5. Navbar
--------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

[data-theme="light"] .navbar {
  background: rgba(248, 248, 252, 0.85);
}

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

/* Logo */
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}

.nav-logo:hover { opacity: 0.8; }

.logo-bracket { color: var(--accent); }
.logo-name    { color: var(--text); }

/* Desktop links */
.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 50%; right: 50%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: left 0.25s var(--ease), right 0.25s var(--ease);
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.nav-link.active::after, .nav-link:hover::after {
  left: 12px; right: 12px;
}

/* Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.hamburger:hover { border-color: var(--accent); }

.bar {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.hamburger.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .bar:nth-child(2) { opacity: 0; }
.hamburger.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem var(--gap) 1.5rem;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-links { display: flex; flex-direction: column; gap: 0.25rem; }

.mobile-link {
  display: block;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}

.mobile-link:hover, .mobile-link.active {
  background: rgba(255,255,255,0.05);
  color: var(--accent);
}

/* ---------------------------------------------------
   6. Buttons
--------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

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

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #0a0a0f;
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ---------------------------------------------------
   7. Hero Section
--------------------------------------------------- */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 5rem) 0;
}

/* Subtle grid bg */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,170,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,170,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

.hero-content { max-width: 540px; }

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.hero-name {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.hero-cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-role {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}

.hero-intro {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 2rem;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

/* Stats */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.stat-label {
  color: var(--text-dim);
  font-family: var(--font-mono);
  min-width: 80px;
}

.stat-value { color: var(--text); }

.stat-active {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
}

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%       { box-shadow: 0 0 0 6px transparent; }
}

/* ---------------------------------------------------
   8. Terminal Visual
--------------------------------------------------- */
.hero-visual {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.terminal {
  width: 100%;
  max-width: 460px;
  background: #0d0d1a;
  border: 1px solid rgba(0,255,170,0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,255,170,0.05),
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px rgba(0,255,170,0.05);
  font-family: var(--font-mono);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #1a1a2e;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-red    { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green  { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.terminal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.terminal-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.t-prompt { color: var(--accent-2); }
.t-dollar  { color: var(--text-dim); }
.t-cmd     { color: var(--accent-3); }

.terminal-output {
  padding: 0 0 0.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: 1.5rem;
}

.terminal-output--accent { color: var(--accent); }

.t-blink {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

/* Floating badges */
.float-badge {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: float 4s ease-in-out infinite;
  white-space: nowrap;
}

.float-badge--1 { top: -10px;  right: -20px; animation-delay: 0s; }
.float-badge--2 { bottom: 30px; left: -30px;  animation-delay: 1.2s; }
.float-badge--3 { bottom: -10px; right: 10px; animation-delay: 2.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 1s 1.5s both;
}

.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

/* ---------------------------------------------------
   9. Tech Chips (Home teaser)
--------------------------------------------------- */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.tech-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  transition: border-color 0.2s, color 0.2s;
}

.tech-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------------------------------------------------
   10. Projects Teaser (Home)
--------------------------------------------------- */
.projects-teaser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.teaser-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s, transform 0.3s;
}

.teaser-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.teaser-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.teaser-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }

.teaser-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.teaser-tech {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--accent);
}

/* ---------------------------------------------------
   11. CTA Banner
--------------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, rgba(0,255,170,0.05) 0%, rgba(124,110,255,0.05) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(3rem, 6vw, 5rem) 0;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

.cta-banner p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------------------------------------------------
   12. Page Header
--------------------------------------------------- */
.page-header {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.page-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.page-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.page-sub {
  color: var(--text-muted);
  max-width: 540px;
  font-size: 1.05rem;
}

.header-line {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  margin-bottom: 1rem;
}

/* ---------------------------------------------------
   13. About Page
--------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* Avatar code block */
.avatar-box {
  position: relative;
  display: flex;
  justify-content: center;
}

.avatar-inner {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.9;
  position: relative;
  z-index: 1;
  max-width: 320px;
  width: 100%;
}

.avatar-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 70%);
  pointer-events: none;
  border-radius: var(--radius-lg);
}

.av-kw    { color: var(--accent-2); }
.av-name  { color: var(--accent-3); }
.av-op    { color: var(--text-muted); }
.av-brace { color: var(--text); }
.av-key   { color: var(--accent); }
.av-colon { color: var(--text-muted); }
.av-str   { color: #ff9e64; }
.av-indent { padding-left: 1.5rem; }

/* About text */
.about-text h2 { margin-bottom: 1rem; }

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

/* Info cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}

.info-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

.info-icon { font-size: 2rem; margin-bottom: 0.75rem; }

.info-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  font-weight: 400;
}

.info-value { font-size: 0.95rem; color: var(--text); font-weight: 500; }

/* Approach grid */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.approach-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s, transform 0.3s;
}

.approach-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.approach-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }

.approach-item h3 { font-size: 1rem; margin-bottom: 0.4rem; }

.approach-item p { font-size: 0.88rem; color: var(--text-muted); }

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

.beyond-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.beyond-icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }

.beyond-item h3 { font-size: 1rem; margin-bottom: 0.4rem; }

.beyond-item p { font-size: 0.88rem; color: var(--text-muted); }

/* ---------------------------------------------------
   14. Skills Page
--------------------------------------------------- */
.skill-category-title {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.cat-icon { font-size: 1.25rem; }

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

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.3s, transform 0.3s;
}

.skill-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.skill-icon { font-size: 1.2rem; }

.skill-name { font-size: 0.95rem; font-weight: 600; }

.skill-bar-wrap {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.skill-bar {
  height: 100%;
  width: 0; /* animated by JS */
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 6px;
  transition: width 1.2s var(--ease);
}

.skill-note {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* Disclaimer box */
.disclaimer-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(124,110,255,0.06);
  border: 1px solid rgba(124,110,255,0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.disclaimer-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 0.1rem; }

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

/* ---------------------------------------------------
   15. Education Page
--------------------------------------------------- */
.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.5rem;
  align-items: flex-start;
}

.timeline-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.5rem;
}

.timeline-dot {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
}

.timeline-line {
  width: 2px;
  flex: 1;
  min-height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin-top: 0.5rem;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 2rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.tl-institution {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.tl-degree {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.tl-degree em { color: var(--accent); font-style: normal; }

.tl-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.tl-period {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}

.tl-status {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-weight: 600;
}

.status-active {
  background: rgba(0,255,170,0.12);
  color: var(--accent);
  border: 1px solid rgba(0,255,170,0.3);
}

.tl-detail {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.tl-detail-label {
  font-family: var(--font-mono);
  color: var(--text-dim);
  min-width: 150px;
}

.tl-detail-value { color: var(--text-muted); }

.tl-section { margin-bottom: 1.25rem; }

.tl-section-title {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.coursework-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.coursework-item {
  background: rgba(0,255,170,0.05);
  border: 1px solid rgba(0,255,170,0.12);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.tl-placeholder {
  font-size: 0.88rem;
  color: var(--text-dim);
  font-style: italic;
  padding: 0.5rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

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

.projects-grid--featured {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

/* Project Card */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 30px rgba(0,255,170,0.05);
}

.card-image-wrap {
  position: relative;
  overflow: hidden;
  height: 180px;
  background: var(--bg-alt);
}

.card-image {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.project-card:hover .card-image { transform: scale(1.04); }

.card-badge {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  background: var(--accent);
  color: #0a0a0f;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
}

.card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tech-badge {
  background: rgba(0,255,170,0.06);
  border: 1px solid rgba(0,255,170,0.15);
  color: var(--accent);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.card-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.card-link--github:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.card-link--demo {
  background: var(--accent);
  color: #0a0a0f;
  border-color: var(--accent);
}

.card-link--demo:hover {
  background: transparent;
  color: var(--accent);
}

/* ---------------------------------------------------
   17. Contact Page
--------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.contact-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.contact-card-icon {
  width: 52px; height: 52px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
}

.contact-card-title {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.contact-card-value {
  font-size: 0.88rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 1rem;
  word-break: break-all;
}

.contact-card-action {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}

.contact-note {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

/* Open to grid */
.open-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.open-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s, transform 0.3s;
}

.open-item:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

.open-icon { font-size: 1.75rem; display: block; margin-bottom: 0.75rem; }

.open-item h3 { font-size: 1rem; margin-bottom: 0.4rem; }

.open-item p { font-size: 0.88rem; color: var(--text-muted); }

/* ---------------------------------------------------
   18. Footer
--------------------------------------------------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--gap) 2.5rem;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.footer-uni {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-heading {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-weight: 400;
}

.footer-nav ul { display: flex; flex-direction: column; gap: 0.4rem; }

.footer-link {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-link:hover { color: var(--accent); }

.social-list { display: flex; flex-direction: column; gap: 0.5rem; }

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.social-link:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem var(--gap);
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-stack { font-family: var(--font-mono); }

/* ---------------------------------------------------
   19. 404 Page
--------------------------------------------------- */
.not-found-section {
  min-height: calc(100vh - var(--nav-height) - 200px);
  display: flex;
  align-items: center;
}

.not-found-container { text-align: center; }

.not-found-code {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.not-found-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.75rem;
}

.not-found-msg {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------------------
   20. Animations / Reveal
--------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ---------------------------------------------------
   21. Responsive / Media Queries
--------------------------------------------------- */

/* Tablet and below */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content { max-width: 100%; }

  .hero-actions { justify-content: center; }

  .hero-stats { text-align: left; }

  .hero-visual {
    justify-content: center;
    order: -1;
  }

  .float-badge--1, .float-badge--2, .float-badge--3 { display: none; }

  .about-grid { grid-template-columns: 1fr; }

  .avatar-box { margin-bottom: 1rem; }

  .timeline-item { grid-template-columns: 36px 1fr; }

  .timeline-dot { width: 36px; height: 36px; font-size: 1rem; }

  .footer-container { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 600px) {
  .nav-links { display: none; }

  .hamburger { display: flex; }

  .mobile-menu { display: block; }

  .hero-name { font-size: 2.5rem; }

  .scroll-indicator { display: none; }

  .tl-meta { align-items: flex-start; }

  .timeline-header { flex-direction: column; }

  .footer-container { grid-template-columns: 1fr; }

  .footer-bottom { flex-direction: column; text-align: center; }

  .projects-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }

  .info-cards { grid-template-columns: 1fr 1fr; }
}

/* Large screens */
@media (min-width: 1280px) {
  .hero-name { font-size: 5rem; }
}

/* Print */
@media print {
  .navbar, .footer, .hero-visual, .cta-banner, .scroll-indicator { display: none; }
  body { background: white; color: black; }
}

