:root {
  --bg-primary: #060a12;
  --bg-secondary: #0b1120;
  --bg-card: rgba(15, 23, 42, 0.8);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --border-subtle: rgba(148, 163, 184, 0.15);
  --border-accent: rgba(56, 189, 248, 0.45);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --gradient-brand: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.16), transparent 70%);
  --shadow-card: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 28px rgba(56, 189, 248, 0.22);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --max-width: 1200px;
}

:root[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-hover: #ffffff;
  --border-subtle: rgba(15, 23, 42, 0.11);
  --border-accent: rgba(2, 132, 199, 0.45);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-indigo: #4f46e5;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --gradient-brand: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  --gradient-glow: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.12), transparent 70%);
  --shadow-card: 0 10px 30px -8px rgba(15, 23, 42, 0.09);
  --shadow-glow: 0 8px 30px rgba(2, 132, 199, 0.14);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Subtle background grid & ambient glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -2;
}

.ambient-glow {
  position: fixed;
  top: -20vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  height: 60vh;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.12) 0%, rgba(99, 102, 241, 0.06) 45%, transparent 75%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent-blue);
}

.container-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ==================== NAVBAR ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(6, 10, 18, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--text-primary);
}

.brand-icon,
.brand-icon-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.28);
  flex-shrink: 0;
  background: #ffffff;
}

.brand-text span {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--text-primary);
}

.lang-btn.active {
  background: var(--gradient-brand);
  color: #060a12;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #060a12 !important;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.26);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.4);
}

.btn-outline {
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-primary) !important;
  border-color: var(--border-subtle);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 10px;
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  border-color: var(--accent-cyan);
}

/* ==================== HERO SECTION ==================== */
.hero {
  position: relative;
  padding: clamp(44px, 7vw, 80px) 0 clamp(40px, 5vw, 60px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(24px, 3.5vw, 44px);
  align-items: center;
}

.hero-content {
  min-width: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: clamp(0.75rem, 1.1vw, 0.83rem);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 20px;
  max-width: 100%;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.25); }
}

.hero-title {
  font-size: clamp(2.15rem, 4.4vw, 3.65rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.hero-title .gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.02rem, 1.6vw, 1.26rem);
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 14px;
}

.hero-description {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.15vw, 1.04rem);
  max-width: 640px;
  margin-bottom: 26px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

/* Hero Right Terminal / Profile Card */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2.5vw, 24px);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-brand);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.terminal-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #10b981; }

.terminal-title {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-code {
  font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
  font-size: clamp(0.76rem, 0.95vw, 0.85rem);
  line-height: 1.72;
  color: #e2e8f0;
}

.code-line {
  word-break: break-word;
}

.code-line.indent-1 {
  padding-left: 2rem;
  text-indent: -1rem;
}

.code-line.indent-2 {
  padding-left: 3rem;
  text-indent: -1rem;
}

.code-key { color: #38bdf8; }
.code-str { color: #a7f3d0; }
.code-num { color: #fcd34d; }
.code-comment { color: #64748b; font-style: italic; }

/* Stats Strip */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.stat-number {
  font-size: clamp(1.55rem, 2.4vw, 1.95rem);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.4;
}

/* ==================== SECTIONS ==================== */
section {
  padding: clamp(52px, 7vw, 76px) 0;
}

.section-header {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 700px;
  margin-top: 8px;
  font-size: clamp(0.94rem, 1.15vw, 1.02rem);
}

/* ==================== EXPERIENCE & EDUCATION ==================== */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid rgba(56, 189, 248, 0.28);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: clamp(20px, 3vw, 26px) clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.timeline-item:hover {
  border-color: var(--border-accent);
  transform: translateX(4px);
}

.timeline-dot {
  position: absolute;
  left: -41px;
  top: 28px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.timeline-item.education .timeline-dot {
  border-color: var(--accent-amber);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.timeline-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.timeline-role {
  font-size: clamp(1.08rem, 1.6vw, 1.2rem);
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-company {
  font-size: 0.94rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-top: 2px;
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.timeline-list {
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.94rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-list li::marker {
  color: var(--accent-cyan);
}

/* ==================== EMSE DEGREE PROGRESS & COURSEWORK ==================== */
.degree-plan-link {
  color: var(--accent-amber);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.degree-plan-link:hover {
  color: var(--accent-cyan);
}

.emse-curriculum {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.emse-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  user-select: none;
}

.emse-summary::-webkit-details-marker {
  display: none;
}

.emse-summary-main {
  flex: 1 1 280px;
  min-width: 0;
}

.emse-expand-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.32);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.emse-summary:hover .emse-expand-btn {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-cyan);
}

.emse-details .emse-expand-text-open {
  display: none;
}

.emse-details[open] .emse-expand-text-closed {
  display: none;
}

.emse-details[open] .emse-expand-text-open {
  display: inline;
}

.emse-progress-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}

.emse-progress-label {
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.emse-progress-pct {
  color: var(--accent-amber);
}

.emse-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
  margin-bottom: 0;
}

.emse-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981 0%, #38bdf8 65%, #f59e0b 100%);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.emse-semesters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  margin-top: 16px;
}

.emse-sem-card {
  background: rgba(9, 14, 26, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

:root[data-theme="light"] .emse-sem-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
}

.emse-sem-card.completed {
  border-left: 3px solid var(--accent-emerald);
}

.emse-sem-card.current {
  border-color: rgba(245, 158, 11, 0.55);
  border-left: 3px solid var(--accent-amber);
  background: rgba(245, 158, 11, 0.07);
}

:root[data-theme="light"] .emse-sem-card.current {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(217, 119, 6, 0.45);
  border-left: 3px solid #d97706;
}

.emse-sem-card.upcoming {
  border-left: 3px solid var(--accent-indigo);
  opacity: 0.9;
}

.emse-sem-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.emse-sem-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.emse-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.emse-badge.done {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

:root[data-theme="light"] .emse-badge.done {
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
}

.emse-badge.active {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

:root[data-theme="light"] .emse-badge.active {
  color: #b45309;
  background: rgba(245, 158, 11, 0.18);
}

.emse-badge.next {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

:root[data-theme="light"] .emse-badge.next {
  color: #4338ca;
  background: rgba(99, 102, 241, 0.12);
}

.emse-course-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.81rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.emse-course-list li {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.emse-course-list code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

:root[data-theme="light"] .emse-course-list code {
  color: #0369a1;
  background: rgba(2, 132, 199, 0.1);
}

/* ==================== SKILLS GRID ==================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.skill-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.skill-cat-title {
  font-size: 1.06rem;
  font-weight: 700;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-size: 0.82rem;
  font-weight: 500;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: 999px;
  transition: all 0.18s ease;
}

.skill-tag:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
}

/* ==================== INTERACTIVE PROJECTS ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}

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

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

.project-preview {
  height: 190px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
}

.preview-tentacles {
  background: radial-gradient(circle at center, #0f2942 0%, #050914 100%);
}

.preview-aeropulse {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 55%, #064e3b 100%);
}

.preview-calc {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.preview-trivia {
  background: radial-gradient(circle at 70% 30%, rgba(56, 189, 248, 0.28) 0%, rgba(168, 85, 247, 0.22) 50%, #060a15 100%);
}

.preview-platform {
  background: radial-gradient(circle at 30% 40%, rgba(216, 0, 255, 0.28) 0%, rgba(255, 0, 68, 0.22) 55%, #070510 100%);
}

.preview-snake {
  background: radial-gradient(circle at center, rgba(57, 255, 20, 0.22) 0%, #050a05 100%);
}

.preview-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(6, 10, 18, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #38bdf8;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.preview-graphic {
  text-align: center;
  padding: 20px;
}

.preview-emoji {
  font-size: 3.1rem;
  margin-bottom: 6px;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(56, 189, 248, 0.35));
}

.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-title {
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.93rem;
  margin-bottom: 18px;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.project-tech span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  padding: 3px 10px;
  border-radius: 6px;
}

.project-body > .btn {
  width: 100%;
  margin-top: auto;
}

.project-card-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
}

.project-card-actions .btn-primary {
  flex: 1 1 auto;
}

.project-card-actions .btn-outline {
  flex: 0 0 auto;
  padding: 10px 14px;
}

/* ==================== ARCADE HALL OF FAME SHOWCASE ==================== */
.arcade-hall-showcase {
  margin-top: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-card);
}

.arcade-hall-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}

.arcade-hall-title {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 800;
  color: var(--text-primary);
}

.arcade-hall-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.arcade-hall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 18px;
}

/* ==================== PASSIONS & MAKER LAB ==================== */
.passions-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: stretch;
}

.passions-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.passion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.passion-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
  display: inline-block;
}

.passion-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.passion-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.garden-showcase {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.garden-img-wrap {
  position: relative;
  height: clamp(220px, 30vw, 290px);
  overflow: hidden;
}

.garden-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.garden-showcase:hover .garden-img-wrap img {
  transform: scale(1.04);
}

.garden-caption {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.garden-caption h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.garden-caption p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* ==================== CONTACT & SOCIALS ==================== */
.contact-box {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(30, 41, 59, 0.85) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 3.5vw, 36px);
  align-items: center;
  box-shadow: var(--shadow-glow);
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.contact-link-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: clamp(0.92rem, 1.1vw, 1rem);
  word-break: break-word;
}

.contact-link-item span.icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(6, 10, 18, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary) !important;
  font-weight: 600;
  transition: all 0.2s ease;
}

.social-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  background: rgba(56, 189, 248, 0.08);
}

.social-card img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
  flex-shrink: 0;
}

.social-card-meta small {
  display: block;
  font-size: 0.74rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ==================== FOOTER ==================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 28px 0;
  margin-top: 32px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ==================== LIGHT MODE OVERRIDES ==================== */
:root[data-theme="light"] body::before {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
}

:root[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.9);
}

:root[data-theme="light"] .brand-icon,
:root[data-theme="light"] .lang-btn.active,
:root[data-theme="light"] .btn-primary {
  color: #ffffff !important;
}

:root[data-theme="light"] .nav-links a:hover,
:root[data-theme="light"] .nav-links a.active {
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-primary);
}

:root[data-theme="light"] .lang-switch {
  background: rgba(226, 232, 240, 0.85);
}

:root[data-theme="light"] .menu-toggle {
  background: #ffffff;
  color: #0f172a;
}

:root[data-theme="light"] .btn-outline {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

:root[data-theme="light"] .status-pill {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.3);
  color: #047857;
}

:root[data-theme="light"] .profile-code {
  color: #1e293b;
}

:root[data-theme="light"] .code-key { color: #0284c7; font-weight: 600; }
:root[data-theme="light"] .code-str { color: #047857; }
:root[data-theme="light"] .code-num { color: #b45309; }
:root[data-theme="light"] .code-comment { color: #64748b; }

:root[data-theme="light"] .skill-tag {
  color: #1e293b;
  background: #f1f5f9;
}

:root[data-theme="light"] .skill-tag:hover {
  color: var(--accent-cyan);
  background: rgba(2, 132, 199, 0.1);
}

:root[data-theme="light"] .contact-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.96) 100%);
}

:root[data-theme="light"] .social-card {
  background: #ffffff;
}

:root[data-theme="light"] .social-card:hover {
  background: rgba(2, 132, 199, 0.06);
}

/* ==================== MULTI-BREAKPOINT RESPONSIVE DESIGN ==================== */

/* Compact theme labels on medium laptops so navbar never crowds */
@media screen and (max-width: 1140px) {
  .theme-label {
    display: none;
  }

  .nav-links a {
    padding: 7px 9px;
    font-size: 0.85rem;
  }
}

/* Tablet Landscape & Smaller Laptops */
@media screen and (max-width: 980px) {
  .hero-grid,
  .passions-layout,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet Portrait & Mobile Navigation Drawer */
.mobile-only-cv {
  display: none;
}

@media screen and (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: rgba(6, 10, 18, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
    flex-direction: column;
    padding: 14px clamp(16px, 4vw, 32px) 18px;
    align-items: stretch;
    gap: 4px;
  }

  :root[data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 11px 14px;
    font-size: 0.96rem;
  }

  .mobile-only-cv {
    display: block;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-subtle);
  }

  .mobile-only-cv a {
    color: var(--accent-cyan) !important;
    font-weight: 700;
  }
}

/* Mobile Devices */
@media screen and (max-width: 640px) {
  .timeline {
    padding-left: 22px;
  }

  .timeline-dot {
    left: -31px;
    top: 24px;
  }

  .timeline-item:hover {
    transform: none;
  }

  .timeline-date {
    white-space: normal;
    line-height: 1.35;
  }

  .emse-expand-btn {
    width: 100%;
    justify-content: center;
  }

  .passions-cards,
  .social-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta .btn {
    flex: 1 1 auto;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

/* Small Mobile Phones (320px - 520px) */
@media screen and (max-width: 520px) {
  .nav-cv-btn {
    display: none;
  }

  .status-pill {
    border-radius: 14px;
    padding: 8px 12px;
  }

  .code-line.indent-1 {
    padding-left: 1.25rem;
    text-indent: -0.75rem;
  }

  .code-line.indent-2 {
    padding-left: 2rem;
    text-indent: -0.75rem;
  }
}

@media screen and (max-width: 420px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .brand-text {
    font-size: 0.98rem;
  }
}