﻿/* ── Variables ── */
:root {
  --primary: #033d54;
  --primary-hover: #02608c;
  --accent: #00bcd4;
  --accent-hover: #00a5ba;
  --bg: #f4f8f9;
  --surface: #ffffff;
  --surface-2: #edf4f6;
  --surface-3: #dceef2;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: rgba(3,61,84,0.10);
  --border-strong: rgba(3,61,84,0.18);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 12px rgba(0,0,0,0.07);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.09);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.11); /* reserved */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

body.dark-mode {
  --bg: #0d1b26;
  --surface: #152433;
  --surface-2: #1a2e3d;
  --surface-3: #213848;
  --text: #e2eaf4;
  --text-muted: #8fa3be;
  --text-light: #5a7a9a;
  --border: rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.13);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 12px rgba(0,0,0,0.35);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.55);
}

/* ── Icon helper ── */
.icon {
  width: 1em; height: 1em;
  display: inline-block; vertical-align: -0.125em;
  fill: currentColor; flex-shrink: 0;
}
.icon-spin {
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
body.theme-ready {
  transition: background 0.3s, color 0.3s;
}

main { position: relative; z-index: 1; }
.container { width: min(1160px, calc(100% - 2.5rem)); margin: 0 auto; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; flex-shrink: 0;
}
.nav-brand-mark {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff;
  letter-spacing: -0.5px;
}
.nav-brand-name {
  font-size: 0.95rem; font-weight: 700;
  color: var(--primary); letter-spacing: -0.01em;
}
body.dark-mode .nav-brand-name { color: var(--text); }

.nav-links {
  display: flex; align-items: center; gap: 0.15rem;
}
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-weight: 500; font-size: 0.875rem;
  padding: 0.4rem 0.85rem; border-radius: 7px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--accent); }
body.dark-mode .nav-links a:hover { background: var(--surface-2); }

.nav-right {
  display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0;
}

.theme-btn {
  width: 34px; height: 34px; border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text-muted);
  font-size: 0.9rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s; font-family: inherit;
}
.theme-btn:hover {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
}

.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all 0.3s ease;
}

/* ── Hero ── */
.hero {
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 2.5rem;
  background: var(--bg);
  border-bottom: none;
  position: relative;
  overflow: hidden;
}
/* subtle grid texture */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: none;
  pointer-events: none;
}

.hero-inner {
  width: 100%; max-width: 1160px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
  position: relative; z-index: 1;
  animation: heroFadeIn 0.6s ease both;
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Left column ── */
.hero-content {
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 0;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.45rem 1.1rem; border-radius: 999px;
  background: rgba(0,188,212,0.1);
  border: 1.5px solid rgba(0,188,212,0.35);
  color: var(--accent); font-size: 0.84rem;
  font-weight: 600; letter-spacing: 0.01em;
  margin-bottom: 1.4rem;
  width: fit-content;
  backdrop-filter: blur(4px);
}
.hero-badge-wave {
  font-size: 1rem;
  line-height: 1;
}

.hero-name {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.03em; color: #ffffff;
  margin-bottom: 0.4rem;
}

.hero-title {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 800; color: var(--accent);
  margin-bottom: 1.2rem; min-height: 2.8rem;
  line-height: 1.1; letter-spacing: -0.02em;
}
#typing-text { color: var(--accent); font-weight: 700; }
#typing-text::after {
  content: '|'; animation: blink 0.8s step-end infinite;
  margin-left: 1px; color: var(--accent);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* Tagline with left border accent */
.hero-tagline {
  font-size: 1rem; font-weight: 600;
  color: rgba(255,255,255,0.82);
  border-left: 3px solid var(--accent);
  padding-left: 0.85rem;
  margin: 0 0 1.1rem;
  font-style: normal;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 0.925rem; line-height: 1.85;
  color: rgba(255,255,255,0.58);
  max-width: 480px;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex; gap: 0.85rem;
  flex-wrap: wrap; justify-content: flex-start;
  margin-bottom: 2.4rem;
}

/* 4-item inline meta row */
.hero-meta {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1.8rem; flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.4rem;
}
.hero-meta-item {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.78rem; color: rgba(255,255,255,0.55);
  font-weight: 500; line-height: 1.45;
}
.hero-meta-item span { /* text lines */ }
.hero-meta-icon {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(0,188,212,0.12);
  border: 1px solid rgba(0,188,212,0.2);
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}
.hero-meta-icon .icon { width: 1rem; height: 1rem; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem; border-radius: 8px;
  background: var(--accent); color: #071a24;
  font-weight: 700; font-size: 0.9rem;
  text-decoration: none; border: none; cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0,188,212,0.35);
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,188,212,0.45);
}
.hero-btn-icon {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-weight: 700; font-size: 0.82rem;
}
.hero-btn-arrow { width: 0.9em; height: 0.9em; flex-shrink: 0; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.5rem; border-radius: 8px;
  background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.82);
  font-weight: 600; font-size: 0.9rem;
  text-decoration: none; cursor: pointer; font-family: inherit;
  border: 1.5px solid rgba(255,255,255,0.22);
  transition: border-color 0.2s, color 0.2s, transform 0.2s, background 0.2s;
  white-space: nowrap;
}
.btn-secondary:hover {
  color: #fff; border-color: rgba(255,255,255,0.48);
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

body:not(.dark-mode) .hero-name { color: var(--primary); }
body:not(.dark-mode) .hero-tagline { color: var(--text); }
body:not(.dark-mode) .hero-desc { color: var(--text-muted); }
body:not(.dark-mode) .hero-meta { border-top-color: var(--border); }
body:not(.dark-mode) .hero-meta-item { color: var(--text-muted); }
body:not(.dark-mode) .btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
body:not(.dark-mode) .btn-secondary:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--surface-2);
}

/* ── Right column — IDE mock ── */
.hero-ide {
  background: #0d1a26;
  border: 1px solid rgba(0,188,212,0.2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,188,212,0.06), 0 20px 56px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  min-height: 380px;
}

/* Title bar */
.hero-ide-titlebar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 1rem;
  background: #0a1520;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.hero-ide-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
}
.ide-red    { background: #ff5f57; }
.ide-yellow { background: #febc2e; }
.ide-green  { background: #28c840; }
.hero-ide-titlebar-name {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  margin-left: 0.5rem;
  letter-spacing: 0.02em;
}
.hero-ide-titlebar-name .icon { width: 0.9em; height: 0.9em; flex-shrink: 0; }
.hero-ide-run-btn {
  display: inline-flex; align-items: center; gap: 0.3rem;
  margin-left: auto;
  padding: 0.22rem 0.75rem; border-radius: 5px;
  background: var(--accent); color: #071a24;
  font-size: 0.72rem; font-weight: 700;
  border: none; cursor: default;
  font-family: inherit;
}
.hero-ide-run-btn .icon { width: 0.6em; height: 0.6em; }

/* Body row: tree + code + sidebar */
.hero-ide-body {
  display: flex; flex: 1; min-height: 0;
}

/* File tree */
.hero-ide-tree {
  width: 116px; flex-shrink: 0;
  background: #0a1520;
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 0.5rem 0;
  overflow: hidden;
}
.ide-tree-item {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.7rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  user-select: none;
}
.ide-tree-item .icon { width: 0.8em; height: 0.8em; flex-shrink: 0; }
.ide-folder-icon { color: rgba(255,255,255,0.35); }
.ide-tree-child  { padding-left: 1.4rem; }
.ide-tree-child2 { padding-left: 2.1rem; }
.ide-tree-active {
  background: rgba(0,188,212,0.1);
  color: rgba(255,255,255,0.85);
  border-right: 2px solid var(--accent);
}
.ide-tree-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 0.35rem 0;
}

/* Code area */
.hero-ide-code {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
}
.hero-ide-tab {
  display: flex; align-items: center;
  background: #0a1520;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.hero-ide-tab-item {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  border-bottom: 2px solid transparent;
  cursor: default; user-select: none;
}
.hero-ide-tab-item.active {
  color: rgba(255,255,255,0.88);
  border-bottom-color: var(--accent);
  background: rgba(255,255,255,0.03);
}
.hero-ide-tab-item .icon { width: 0.75em; height: 0.75em; }
.hero-ide-tab-close {
  margin-left: 0.25rem; opacity: 0.4; font-size: 0.85rem; line-height: 1;
}

/* Code lines */
.hero-ide-lines {
  flex: 1; padding: 0.8rem 2rem 0.8rem 0.6rem;
  counter-reset: ideline;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  min-width: 0;
}
.hero-ide-lines::-webkit-scrollbar { display: none; }
.iln {
  display: block;
  counter-increment: ideline;
  white-space: pre;
  font-size: 0.72rem;
}
.iln::before {
  content: counter(ideline);
  display: inline-block;
  width: 1.4rem;
  margin-right: 0.8rem;
  text-align: right;
  color: rgba(255,255,255,0.15);
  user-select: none;
  font-size: 0.68rem;
}
/* Dart/Flutter syntax colours */
.ck  { color: #7dcfff; }
.cv  { color: #e2eaf4; }
.cp  { color: #bb9af7; }
.cs  { color: #9ece6a; }
.cn  { color: #ff9e64; }
.cc  { color: rgba(255,255,255,0.28); font-style: italic; }
.ca  { color: #54c5f8; }
.ce  { color: #e2eaf4; }

/* Right tech icon sidebar */
.hero-ide-sidebar {
  width: 36px; flex-shrink: 0;
  background: #08121c;
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column;
  align-items: center;
  padding: 0.8rem 0;
  gap: 0.7rem;
  overflow: hidden;
}
.hero-ide-sidebar-icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.75;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.hero-ide-sidebar-icon svg { width: 16px; height: 16px; }
.hero-ide-sidebar-icon:hover { opacity: 1; }

/* Resume modal */
.resume-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.82);
  z-index: 1000; display: flex;
  align-items: center; justify-content: center;
  padding: 1rem;
}
.resume-modal-content {
  position: relative; width: 100%;
  max-width: 860px; height: 90vh;
  background: #0d1b2a; border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,188,212,0.2);
}
.resume-modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 1.3rem; cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.resume-modal-close:hover { background: rgba(0,188,212,0.3); }
.resume-iframe { width: 100%; height: 100%; border: none; }

.project-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.88);
  box-sizing: border-box;
  overflow: hidden;
}

.project-preview-content {
  position: relative;
  z-index: 2;
  width: min(1100px, 100%);
  max-height: calc(100vh - 6.5rem);
  padding: 2rem 1.25rem 1rem;
  border-radius: 20px;
  background: var(--surface-2);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
  overflow-y: auto;
}

.project-preview-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.project-preview-close:hover {
  background: var(--accent);
  color: var(--surface);
}

.project-preview-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 12rem);
  object-fit: contain;
  border-radius: 10px;
}

.project-preview-title {
  margin: 0.8rem 0 0;
  color: var(--text);
  text-align: center;
  font-weight: 700;
}

/* ── Stats ── */
.stats-section {
  padding: 0 0 4rem; position: relative; z-index: 1;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.stat-card {
  padding: 1.5rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); text-align: center;
}
.stat-value {
  font-size: 2rem; font-weight: 800;
  color: var(--primary); letter-spacing: -0.02em;
  line-height: 1;
}
body.dark-mode .stat-value { color: var(--accent); }
.stat-label {
  margin-top: 0.35rem; color: var(--text-muted);
  font-size: 0.82rem; font-weight: 500;
}

/* ── Section shared ── */
.section { padding: 4.5rem 0; }

.section-header {
  text-align: center; margin-bottom: 2.5rem;
}
.eyebrow {
  display: inline-block;
  padding: 0.28rem 0.75rem; border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-muted); font-size: 0.7rem;
  font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 0.75rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 700; color: var(--primary);
  letter-spacing: -0.02em; line-height: 1.2;
}
body.dark-mode .section-header h2 { color: var(--text); }
.section-header p {
  margin-top: 0.6rem; color: var(--text-muted);
  font-size: 0.95rem; max-width: 460px; margin-left: auto; margin-right: auto;
}

/* ── Skills ── */
.skills-filter { display: none; }

.skills-rows {
  display: flex;
  flex-direction: column;
  max-width: 900px;
  margin: 0 auto;
}

.skills-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}
.skills-row:first-child { border-top: none; }

.skills-row-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.skills-row-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(0,188,212,0.12);
  border: 1px solid rgba(0,188,212,0.25);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.skills-row-icon svg { width: 20px; height: 20px; }
.skills-row-label {
  font-size: 1.05rem; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Pill = icon block flush left + text */
.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
  box-shadow: var(--shadow-sm);
}
.skill-pill:hover {
  border-color: rgba(0,188,212,0.55);
  background: rgba(0,188,212,0.06);
  color: var(--accent);
}

/* Coloured icon block — left side of pill */
.skill-pill-icon {
  width: 38px; height: 38px;
  border-radius: 999px 0 0 999px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.skill-pill-icon img {
  width: 20px; height: 20px;
  object-fit: contain;
  display: block;
}
.skill-pill-icon svg { width: 20px; height: 20px; }

/* Skill name text */
.skill-pill-name {
  padding: 0 1rem 0 0.6rem;
  line-height: 38px;
}

/* Letter fallback */
.skill-pill-icon--fallback {
  width: 38px; height: 38px;
  border-radius: 999px 0 0 999px;
  background: rgba(0,188,212,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 0.72rem; font-weight: 700;
  color: var(--accent);
}

/* Skeletons */
.skills-row-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.skills-row-skeleton:first-child { border-top: none; }


/* ── Projects ── */
.projects-filter {
  display: flex; justify-content: center;
  gap: 0.5rem; margin-bottom: 2.5rem; flex-wrap: wrap;
}
.filter-tab {
  padding: 0.5rem 1.2rem; border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-muted);
  font-weight: 500; font-size: 0.875rem;
  cursor: pointer; font-family: inherit;
  transition: all 0.22s ease;
}
.filter-tab:hover { border-color: var(--accent); color: var(--text); }
.filter-tab.active {
  background: var(--primary); color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(3,61,84,0.22);
}
body.dark-mode .filter-tab.active {
  background: var(--accent); color: #071a24; border-color: var(--accent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.project-card {
  border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: hidden; display: flex; flex-direction: column;
}
.project-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(0,188,212,0.25);
}

.project-img-wrap {
  position: relative; overflow: hidden; height: 185px;
  background: var(--surface-2);
}
.project-img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.project-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  color: var(--text-light); font-size: 1.5rem;
  font-family: monospace;
}

.project-type-badge {
  position: absolute; top: 0.6rem; left: 0.6rem;
  padding: 0.2rem 0.55rem; border-radius: 4px;
  font-size: 0.68rem; font-weight: 600; z-index: 2;
}
.project-type-badge.web    { background: rgba(59,130,246,0.85); color: #fff; }
.project-type-badge.mobile { background: rgba(139,92,246,0.85); color: #fff; }

.project-body {
  padding: 1.3rem; display: flex;
  flex-direction: column; flex: 1;
}
.project-body h3 {
  font-size: 1rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}
.project-body p {
  color: var(--text-muted); line-height: 1.65;
  font-size: 0.875rem; flex: 1; margin-bottom: 1rem;
}
.project-tech {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem;
}
.project-tech span {
  padding: 0.22rem 0.65rem;
  background: rgba(0,188,212,0.08);
  color: var(--accent); border-radius: 6px;
  font-size: 0.75rem; font-weight: 500;
  border: 1px solid rgba(0,188,212,0.18);
}
.project-tech .more-tech {
  background: var(--surface-2); color: var(--text-muted);
  border-color: var(--border);
}
.project-actions {
  display: flex; gap: 0.6rem; margin-top: auto;
}
.proj-btn-primary {
  flex: 1; padding: 0.55rem 0.8rem;
  background: var(--primary); color: #fff;
  border-radius: var(--radius-sm); text-decoration: none;
  font-weight: 600; font-size: 0.8rem; text-align: center;
  transition: background 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 0.3rem;
}
.proj-btn-primary:hover { background: var(--primary-hover); }
body.dark-mode .proj-btn-primary {
  background: var(--accent); color: #071a24;
}
body.dark-mode .proj-btn-primary:hover { background: var(--accent-hover); }

.proj-btn-secondary {
  flex: 1; padding: 0.55rem 0.8rem;
  background: transparent; color: var(--text-muted);
  border-radius: var(--radius-sm); text-decoration: none;
  font-weight: 500; font-size: 0.8rem; text-align: center;
  border: 1px solid var(--border-strong);
  transition: color 0.2s, border-color 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 0.3rem;
}
.proj-btn-secondary:hover {
  color: var(--text); border-color: var(--text-muted);
}
.proj-btn-private { cursor: default; }
.proj-btn-private:hover { transform: none; }

.projects-toggle { text-align: center; margin-top: 2.5rem; }
.btn-show-more {
  padding: 0.7rem 2rem; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text-muted); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all 0.22s ease; box-shadow: var(--shadow-sm);
}
.btn-show-more:hover {
  border-color: var(--accent); color: var(--accent);
  transform: translateY(-2px); box-shadow: var(--shadow);
}

/* ── Experience ── */
.experience-list { display: flex; flex-direction: column; gap: 1rem; max-width: 860px; margin: 0 auto; }
.exp-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow-sm); display: flex; gap: 1.2rem;
  transition: border-color 0.2s;
}
.exp-card:hover { border-color: rgba(0,188,212,0.25); }
.exp-logo {
  width: 116px; height: 116px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: visible; font-size: 1.5rem;
}
.exp-logo img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}

.exp-body { flex: 1; min-width: 0; }
.exp-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem; margin-bottom: 0.3rem;
  flex-wrap: wrap;
}
.exp-role { font-size: 1rem; font-weight: 700; color: var(--text); }
.exp-date {
  font-size: 0.78rem; font-weight: 600; color: var(--accent);
  background: rgba(0,188,212,0.08); border: 1px solid rgba(0,188,212,0.18);
  padding: 0.2rem 0.65rem; border-radius: 999px; white-space: nowrap;
}
.exp-company { font-size: 0.92rem; color: var(--text-muted); font-weight: 600; margin-bottom: 0.5rem; letter-spacing: 0.01em; }
.exp-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 0.8rem; }
.exp-tech { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.exp-tech span {
  padding: 0.18rem 0.6rem; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.75rem; font-weight: 500;
}

/* ── Education ── */
.education-grid {
  display: grid; gap: 1.2rem; max-width: 980px; margin: 0 auto;
  align-items: stretch;
}
.education-count-1 { grid-template-columns: minmax(280px, 520px); justify-content: center; }
.education-count-2,
.education-count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.education-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.education-count-many {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.edu-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 0.8rem;
  transition: border-color 0.2s;
}
.edu-card:hover { border-color: rgba(0,188,212,0.25); }
.edu-logo {
  width: 100%; height: 148px;
  display: flex; align-items: center; justify-content: center;
  overflow: visible; font-size: 1.5rem;
}
.edu-logo img {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  padding: 0;
}

.edu-institution { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.2rem; }
.edu-program { font-size: 0.875rem; color: var(--accent); font-weight: 600; margin-bottom: 0.5rem; }
.edu-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }

/* ── Certifications ── */
.cert-carousel { position: relative; max-width: 580px; margin: 0 auto; }
.cert-slider-wrapper { overflow: hidden; border-radius: var(--radius-lg); }
.cert-slider { display: flex; transition: transform 0.5s cubic-bezier(0.4,0,0.2,1); }
.cert-slide { flex: 0 0 100%; display: flex; justify-content: center; }
.cert-card {
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
}
.cert-img {
  width: 100%; height: auto; min-height: 280px; max-height: 420px;
  object-fit: cover; background: var(--surface-2); display: block;
}
.cert-body { padding: 1.3rem; text-align: center; }
.cert-body h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.cert-body p { color: var(--text-muted); font-size: 0.85rem; }
.cert-credential {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: 0.6rem; font-size: 0.8rem; font-weight: 600;
  color: var(--accent); text-decoration: none;
}
.cert-credential:hover { text-decoration: underline; }
.cert-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text-muted); font-size: 1.1rem; cursor: pointer; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; box-shadow: var(--shadow);
}
.cert-nav:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.cert-nav.prev { left: -18px; }
.cert-nav.next { right: -18px; }
.cert-dots { display: flex; justify-content: center; gap: 7px; margin-top: 1.2rem; }
.cert-dot {
  width: 8px; height: 8px; border-radius: 50%;
  border: none; background: var(--border-strong);
  cursor: pointer; transition: all 0.25s; padding: 0;
}
.cert-dot.active { background: var(--accent); transform: scale(1.4); }

/* ── Timeline ── */
.timeline-track {
  position: relative; max-width: 700px; margin: 0 auto;
  padding-left: 2rem;
  display: flex; flex-direction: column; gap: 0;
}
.timeline-track::before {
  content: ''; position: absolute;
  left: 0; top: 8px; bottom: 8px; width: 2px;
  background: var(--border-strong);
  border-radius: 2px;
}
.timeline-item {
  position: relative; padding: 0 0 2.2rem 1.8rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -6px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  transition: transform 0.25s ease;
}
.timeline-item:hover .timeline-dot { transform: scale(1.3); }
.timeline-year {
  font-size: 0.75rem; font-weight: 700; color: var(--accent);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.3rem;
}
.timeline-title {
  font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.35rem;
}
.timeline-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.75; }

/* ── Contact ── */
.contact-layout {
  display: block; max-width: 760px; margin: 0 auto;
}
.contact-form {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 1rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%; padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,188,212,0.12);
  background: var(--surface);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button {
  padding: 0.75rem; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; border: none;
  font-size: 0.92rem; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background 0.2s;
}
.contact-form button:hover { background: var(--primary-hover); }
body.dark-mode .contact-form button {
  background: var(--accent); color: #071a24;
}
body.dark-mode .contact-form button:hover { background: var(--accent-hover); }
#contact-status { font-size: 0.875rem; min-height: 1.3rem; text-align: center; }

/* ── Footer ── */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem 2.5rem 3rem;
}
.footer-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 0.6rem; }
.footer-brand-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: #fff;
}
.footer-brand-name { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.footer-copy { font-size: 0.82rem; color: var(--text-light); }
.footer-social { display: flex; gap: 0.5rem; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.9rem; text-decoration: none;
  transition: all 0.22s ease;
}
.footer-social a:hover {
  color: var(--accent); border-color: var(--accent);
  transform: translateY(-2px);
}
.footer-contact { display: flex; align-items: center; gap: 1.5rem; }
#footer-phone {
  font-size: 0.85rem; color: var(--text-muted); text-decoration: none;
  transition: color 0.22s ease;
}
#footer-phone:hover {
  color: var(--accent);
}

/* ── Reveal ── */
.skeleton-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); position: relative;
  isolation: isolate;
  min-height: 100px;
}
.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.3) 50%,
    rgba(255,255,255,0) 100%);
  animation: shimmer 1.5s infinite;
}
body.dark-mode .skeleton-card::after {
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0) 100%);
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.skeleton {
  position: relative; overflow: hidden; background: var(--surface-2);
  border-radius: 8px;
}
.skeleton-line,
.skeleton-pill,
.skeleton-bar,
.skeleton-logo,
.skeleton-logo-lg,
.skeleton-image,
.skeleton-dot {
  position: relative; overflow: hidden; background: var(--surface-2);
}
@keyframes pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-skill,
.skeleton-project,
.skeleton-experience,
.skeleton-education,
.skeleton-timeline,
.skeleton-cert {
  display: flex; flex-direction: column; gap: 1rem; padding: 1rem;
}

.skeleton-skill {
  padding: 1.1rem 1.4rem;
}
.skeleton-skill .skeleton-bar {
  height: 6px;
}

.skeleton-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.7rem;
}
.about-pill-row {
  justify-content: flex-start; margin-top: 0.3rem;
}
.skeleton-line {
  height: 12px; border-radius: 8px; width: 100%;
}
.skeleton-short { width: 28%; }
.skeleton-wide { width: 72%; }
.skeleton-long { width: 78%; }
.skeleton-medium { width: 58%; }
.skeleton-small { width: 30%; }
.skeleton-pill {
  width: 62px; height: 24px; border-radius: 999px;
}
.skeleton-short { width: 54px; }
.skeleton-bar {
  height: 14px; width: 100%; border-radius: 999px;
}
.skeleton-body {
  display: flex; flex-direction: column; gap: 0.7rem; width: 100%;
}
.skeleton-image,
.skeleton-logo,
.skeleton-logo-lg {
  border-radius: 12px;
}
.skeleton-image {
  width: 100%; height: 180px;
}
.skeleton-logo {
  width: 110px; height: 110px;
}
.skeleton-logo-lg {
  width: 100%; height: 140px;
}
.skeleton-tags {
  display: flex; gap: 0.5rem; margin-top: 0.4rem;
}
.skeleton-tags .skeleton-pill {
  width: 60px; height: 24px;
}
.skeleton-project {
  padding: 0;
  gap: 0;
}
.skeleton-project .skeleton-image {
  height: 190px; border-radius: 16px 16px 0 0;
}
.skeleton-project .skeleton-body {
  padding: 1rem 1rem 1.2rem;
}
.skeleton-experience {
  display: flex; flex-direction: row; align-items: center; gap: 1rem;
  padding: 1.2rem 1.5rem;
}
.skeleton-education {
  padding: 1.2rem;
}
.skeleton-timeline {
  position: relative; padding: 0.8rem 0.8rem 1rem 1.8rem;
}
.skeleton-dot {
  position: absolute; left: -10px; top: 22px;
  width: 16px; height: 16px; border-radius: 50%;
}
.skeleton-cert {
  padding: 0; gap: 0; border-radius: 20px;
}
.skeleton-cert-image {
  width: 100%; height: 280px; border-radius: 16px 16px 0 0;
}

.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Skeletons are always visible — don't hide them */
.skeleton-card {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .hero-content { animation: none; }
  .hero-inner { animation: none; }
  #typing-text::after { animation: none; }
  .cert-slider { transition: none; }
  .skill-bar-fill { transition: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 2rem; }
  .education-count-3,
  .education-count-many {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-content { text-align: center; }
  .hero-badge { margin-left: auto; margin-right: auto; }
  .hero-tagline { text-align: left; }
  .hero-desc { margin: 0 auto 2rem; }
  .hero-actions { justify-content: center; }
  .hero-meta { justify-content: center; }
  .hero-ide { max-width: 560px; margin: 0 auto; min-height: 360px; }
}
@media (max-width: 700px) {
  .topbar { padding: 0 1.2rem; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem; gap: 0.15rem;
    box-shadow: var(--shadow-md); z-index: 199;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 0.85rem; }
  .menu-toggle { display: flex; }
  .nav-admin-link { display: none; }
  .hero { padding: 2rem 1.2rem; min-height: unset; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-content { text-align: center; }
  .hero-desc { margin: 0 auto 2rem; }
  .hero-actions { justify-content: center; }
  .hero-meta,
  .stats-section { display: none; }
  .hero-ide { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .form-row { grid-template-columns: 1fr; }
  .exp-card { flex-direction: column; gap: 1rem; }
  .exp-date { white-space: normal; }
  .section { padding: 3rem 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .cert-nav.prev { left: -10px; }
  .cert-nav.next { right: -10px; }
  /* skills: compact on mobile, max 3 pills per category */
  .skill-pill:nth-child(n+4) { display: none; }
  .skills-row { padding: 0.75rem 0; gap: 0.6rem; }
  .skill-pills { gap: 0.45rem; }
  .skill-pill-icon,
  .skill-pill-icon--fallback { width: 32px; height: 32px; }
  .skill-pill-icon img { width: 17px; height: 17px; }
  .skill-pill-name { padding: 0 0.8rem 0 0.5rem; line-height: 32px; font-size: 0.82rem; }
  .skills-row-icon { width: 32px; height: 32px; }
  .skills-row-icon svg { width: 17px; height: 17px; }
  .skills-row-label { font-size: 0.95rem; }
}
@media (max-width: 480px) {
  .hero-name { font-size: 2.4rem; }
  .education-grid,
  .education-count-1,
  .education-count-2,
  .education-count-3,
  .education-count-4 { grid-template-columns: 1fr; }
}
