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

:root {
  --bg:          #0a0a0f;
  --bg-alt:      #0f0f18;
  --surface:     #13131f;
  --surface-2:   #1a1a2e;
  --border:      rgba(255,255,255,0.07);
  --border-hover:rgba(255,255,255,0.15);
  --text:        #e2e8f0;
  --text-muted:  #8892a4;
  --text-dim:    #4a5568;
  --accent:      #6366f1;
  --accent-2:    #8b5cf6;
  --accent-3:    #06b6d4;
  --glow:        rgba(99,102,241,0.3);
  --radius:      12px;
  --radius-lg:   20px;
  --nav-h:       72px;
  --transition:  0.25s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
  --bg:          #f8fafc;
  --bg-alt:      #f1f5f9;
  --surface:     #ffffff;
  --surface-2:   #f1f5f9;
  --border:      rgba(0,0,0,0.08);
  --border-hover:rgba(0,0,0,0.18);
  --text:        #0f172a;
  --text-muted:  #475569;
  --text-dim:    #94a3b8;
  --glow:        rgba(99,102,241,0.15);
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

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

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

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ─── UTILITIES ──────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section { padding: 120px 0; }
.section-alt { background: var(--bg-alt); }

.section-label {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 60px;
  line-height: 1.15;
}

.center-btn { text-align: center; margin-top: 48px; }

.hidden { display: none !important; }

/* ─── REVEAL ANIMATION ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1), transform 0.65s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 24px var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px var(--glow); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border-hover);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.btn-secondary:hover { background: var(--surface); transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

/* ─── NAV ────────────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
}
#navbar.scrolled {
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] #navbar.scrolled { background: rgba(248,250,252,0.85); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links .btn-nav {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff !important;
  padding: 8px 18px;
}
.nav-links .btn-nav:hover { opacity: 0.9; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 38px; height: 38px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="light"] .moon { display: none; }
[data-theme="dark"] .sun, :root:not([data-theme]) .sun { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 24px 24px;
  gap: 4px;
}
.mobile-menu a {
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.mobile-menu a:hover { background: var(--surface-2); color: var(--text); }
.mobile-menu.open { display: flex; }

/* ─── HERO ───────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
  text-align: center;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -150px; left: -150px;
  animation-delay: 0s;
}
.blob-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent-3), transparent 70%);
  bottom: -100px; right: -100px;
  animation-delay: -4s;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 15px) scale(0.97); }
}

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

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

/* Two-column hero layout */
.hero-two-col {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 64px;
  text-align: left;
}

.hero-text { display: flex; flex-direction: column; align-items: flex-start; }
.hero-text .hero-badge { align-self: flex-start; }
.hero-text .hero-cta { justify-content: flex-start; }
.hero-text .hero-social { justify-content: flex-start; }

/* Photo */
.hero-photo-wrap {
  position: relative;
  flex-shrink: 0;
  animation: fadeUp 0.9s 0.5s both;
}

.hero-photo-ring {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 0 0 8px rgba(99,102,241,0.1);
  z-index: 1;
}

.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border: 3px solid var(--bg);
}

.hero-photo-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, transparent 70%);
  z-index: 0;
  animation: blobFloat 6s ease-in-out infinite;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  animation: fadeUp 0.8s 0.1s both;
}

#hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 16px;
  animation: fadeUp 0.8s 0.2s both;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 24px;
  min-height: 2rem;
  font-family: 'Fira Code', monospace;
  animation: fadeUp 0.8s 0.3s both;
}

.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--accent);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 10 auto 36px;
  line-height: 1.8;
  animation: fadeUp 0.8s 0.4s both;
}

.hero-cta {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 48px;
  animation: fadeUp 0.8s 0.5s both;
}

.hero-social {
  display: flex; gap: 16px; justify-content: center;
  animation: fadeUp 0.8s 0.6s both;
}

.social-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.scroll-hint {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeUp 1s 1s both;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%       { transform: scaleY(0.6); opacity: 0.5; }
}

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

/* ─── ABOUT ──────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.85;
}
.about-text p strong { color: var(--text); }

.about-links { margin-top: 28px; }

.link-underline {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  position: relative;
  display: inline-flex; align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}
.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.link-underline:hover { gap: 8px; }
.link-underline:hover::after { transform: scaleX(1); }

.skills-grid { display: flex; flex-direction: column; gap: 24px; }

.skill-category h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 10px;
  font-family: 'Fira Code', monospace;
}

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

.skill-tags span {
  padding: 5px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  cursor: default;
}
.skill-tags span:hover { border-color: var(--accent); color: var(--accent); background: rgba(99,102,241,0.08); }

/* ─── ABOUT STATS ────────────────────────────────────────────── */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: border-color var(--transition);
}
.stat:hover { border-color: var(--accent); }
.stat-num {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  font-weight: 500;
}

/* ─── TIMELINE ───────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 16px; top: 24px; bottom: 24px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 24px;
  padding-bottom: 40px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.3);
  margin-top: 6px;
  flex-shrink: 0;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}
.timeline-card:hover { border-color: var(--border-hover); transform: translateX(4px); }

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.timeline-header h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }

.company {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  font-family: 'Fira Code', monospace;
}
.company::before { content: '→'; }

.timeline-date {
  font-size: 12px;
  font-family: 'Fira Code', monospace;
  color: var(--text-dim);
  white-space: nowrap;
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.timeline-bullets li {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
}
.timeline-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
  top: 3px;
}
.timeline-bullets li strong { color: var(--text); }

.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline-tags span {
  padding: 3px 10px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 5px;
  font-size: 11px;
  color: var(--accent);
  font-family: 'Fira Code', monospace;
}

/* ─── PROJECTS ───────────────────────────────────────────────── */
.filter-tabs {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: default;
}
.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.project-card.featured { border-color: rgba(99,102,241,0.3); }
.project-card.featured::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(99,102,241,0.15), transparent, rgba(139,92,246,0.1));
  pointer-events: none;
}

.featured-badge {
  position: absolute; top: 20px; right: 20px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(99,102,241,0.12);
  border: 1px solid rgba(99,102,241,0.25);
  padding: 3px 8px;
  border-radius: 5px;
}

.project-top {
  display: flex; align-items: center; justify-content: space-between;
}
.project-icon { font-size: 28px; }
.project-links { display: flex; gap: 10px; }
.project-links a {
  color: var(--text-dim);
  transition: color var(--transition);
  display: flex; align-items: center;
}
.project-links a:hover { color: var(--accent); }

.project-card h3 { font-size: 1.1rem; font-weight: 700; }
.project-card p { color: var(--text-muted); font-size: 14px; line-height: 1.75; flex: 1; }

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tags span {
  padding: 3px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Fira Code', monospace;
}

.project-card.hide {
  display: none;
}

/* ─── PROJECT META ───────────────────────────────────────────── */
.project-meta {
  font-size: 11px;
  font-family: 'Fira Code', monospace;
  color: var(--text-dim);
}

/* ─── RESUME DOWNLOAD ────────────────────────────────────────── */
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.resume-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.resume-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}
.resume-icon { font-size: 40px; }
.resume-info { flex: 1; }
.resume-info h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.resume-info p { color: var(--text-muted); font-size: 14px; line-height: 1.75; margin-bottom: 12px; }
.resume-meta span {
  font-size: 12px;
  font-family: 'Fira Code', monospace;
  color: var(--text-dim);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 6px;
}
.resume-btn {
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

/* ─── BLOG ───────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color var(--transition), transform var(--transition);
}
.blog-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }

.blog-meta {
  display: flex; align-items: center; gap: 10px;
}
.blog-tag {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent-3);
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.2);
  padding: 3px 8px; border-radius: 5px;
}
.blog-date {
  font-size: 12px;
  font-family: 'Fira Code', monospace;
  color: var(--text-dim);
}

.blog-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}
.blog-card p { color: var(--text-muted); font-size: 14px; line-height: 1.75; flex: 1; }

.blog-read-more {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  transition: gap var(--transition);
}
.blog-read-more:hover { gap: 8px; }

/* ─── CONTACT ────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.contact-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 36px;
}

.contact-items { display: flex; flex-direction: column; gap: 24px; }

.contact-item {
  display: flex; align-items: flex-start; gap: 16px;
}
.contact-icon {
  width: 44px; height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.contact-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 2px; }
.contact-item a { color: var(--accent); font-weight: 500; }
.contact-item span { color: var(--text-muted); font-size: 15px; }

.contact-form { display: flex; flex-direction: column; gap: 20px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-group input.error,
.form-group textarea.error { border-color: #ef4444; }

.form-error {
  font-size: 12px;
  color: #ef4444;
  min-height: 16px;
}

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

.form-success {
  padding: 14px 18px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 10px;
  color: #10b981;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-text {
  font-size: 13px;
  color: var(--text-dim);
}
.footer-social { display: flex; gap: 10px; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */

/* iPad landscape + small laptops (1024px and below) */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }

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

  .about-text p { font-size: 1rem; }

  .skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

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

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

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

  .resume-grid { grid-template-columns: 1fr; max-width: 600px; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-photo-ring { width: 240px; height: 240px; }
  .hero-two-col { gap: 40px; }
}

/* iPad portrait (768px – 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  :root { --nav-h: 68px; }

  .section { padding: 96px 0; }
  .section-title { font-size: 2.2rem; margin-bottom: 48px; }

  #hero h1 { font-size: 3.6rem; }
  .hero-sub { font-size: 1rem; }

  .nav-links { gap: 2px; }
  .nav-links a { padding: 7px 10px; font-size: 13px; }

  .timeline-header { flex-wrap: wrap; gap: 8px; }
  .timeline-card { padding: 22px; }

  .contact-info { max-width: 600px; }

  .footer-inner { justify-content: center; gap: 20px; }
}

/* Hamburger nav breakpoint (below 900px) */
@media (max-width: 899px) {
  .nav-links { display: none; }
  .hamburger { display: flex; margin-left: auto; }
  #navbar { height: auto; min-height: var(--nav-h); }
  .nav-inner { height: var(--nav-h); }
  .theme-toggle { order: 2; }
  .hamburger { order: 3; }
}

/* Large phones / small tablets (600px – 767px) */
@media (max-width: 767px) {
  :root { --nav-h: 60px; }

  .container { padding: 0 20px; }

  .section { padding: 72px 0; }
  .section-title { font-size: 1.9rem; margin-bottom: 36px; }
  .section-label { font-size: 12px; }

  /* Hero */
  #hero { padding: calc(var(--nav-h) + 32px) 20px 60px; }
  #hero h1 { font-size: 2.6rem; }
  .hero-title { font-size: 1rem; }
  .hero-sub { font-size: 0.95rem; }
  .hero-badge { font-size: 12px; padding: 7px 14px; }
  .hero-cta { gap: 12px; }
  .blob-1 { width: 350px; height: 350px; top: -100px; left: -100px; }
  .blob-2 { width: 300px; height: 300px; bottom: -80px; right: -80px; }
  /* Stack hero vertically on tablet-small */
  .hero-two-col {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }
  .hero-two-col .hero-photo-wrap { margin: 0 auto; }
  .hero-photo-ring { width: 180px; height: 180px; }
  .hero-text { align-items: center; }
  .hero-text .hero-cta { justify-content: center; }
  .hero-text .hero-social { justify-content: center; }

  /* About */
  .about-grid { gap: 32px; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .about-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .resume-grid { grid-template-columns: 1fr; }
  .resume-card { padding: 24px; }

  /* Timeline */
  .timeline::before { left: 11px; }
  .timeline-item { grid-template-columns: 24px 1fr; gap: 14px; padding-bottom: 28px; }
  .timeline-dot { width: 11px; height: 11px; }
  .timeline-card { padding: 20px; }
  .timeline-header { flex-direction: column; gap: 8px; }
  .timeline-date { align-self: flex-start; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; }
  .filter-tabs { gap: 6px; }
  .filter-btn { padding: 7px 14px; font-size: 12px; }

  /* Blog */
  .blog-grid { grid-template-columns: 1fr; }

  /* Contact */
  .form-row { grid-template-columns: 1fr; gap: 16px; }
  .contact-items { gap: 18px; }
  .contact-intro { font-size: 0.98rem; }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 14px; }
}

/* Phones (375px – 599px) */
@media (max-width: 599px) {
  :root { --nav-h: 56px; }

  .container { padding: 0 16px; }

  .section { padding: 60px 0; }
  .section-title { font-size: 1.7rem; margin-bottom: 28px; }

  /* Hero */
  #hero { padding: calc(var(--nav-h) + 24px) 16px 48px; text-align: center; }
  #hero h1 { font-size: 2.1rem; letter-spacing: -0.03em; }
  .hero-title { font-size: 0.9rem; }
  .hero-sub { font-size: 0.9rem; margin-bottom: 28px; }
  .hero-badge { font-size: 11px; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-cta .btn-primary,
  .hero-cta .btn-secondary { justify-content: center; }
  .hero-social { gap: 12px; }
  .scroll-hint { display: none; }
  .hero-two-col {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }
  .hero-two-col .hero-photo-wrap { margin: 0 auto; }
  .hero-photo-ring { width: 150px; height: 150px; }
  .hero-text { align-items: center; }
  .hero-text .hero-badge { align-self: center; }
  .hero-text .hero-cta { justify-content: center; }
  .hero-text .hero-social { justify-content: center; }

  /* Nav */
  .logo { font-size: 19px; }
  .nav-inner { padding: 0 16px; }

  /* About */
  .about-grid { gap: 28px; }
  .skills-grid { grid-template-columns: 1fr; gap: 14px; }
  .skill-tags span { font-size: 12px; }
  .about-text p { font-size: 0.95rem; }

  /* Timeline */
  .timeline::before { display: none; }
  .timeline-item { grid-template-columns: 1fr; gap: 0; padding-bottom: 20px; }
  .timeline-dot { display: none; }
  .timeline-card { padding: 18px; border-left: 2px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }

  /* Projects */
  .project-card { padding: 20px; }
  .featured-badge { top: 14px; right: 14px; }

  /* Blog */
  .blog-card { padding: 20px; }

  /* Contact */
  .contact-icon { width: 38px; height: 38px; font-size: 16px; }
  .contact-item span { font-size: 13px; }
  .form-group input,
  .form-group textarea { font-size: 16px; } /* prevent iOS zoom on focus */

  /* Buttons */
  .btn-primary, .btn-secondary { padding: 13px 22px; font-size: 14px; }

  /* Mobile menu */
  .mobile-menu { padding: 12px 16px 20px; }
}

/* Very small phones (below 375px) */
@media (max-width: 374px) {
  #hero h1 { font-size: 1.8rem; }
  .section-title { font-size: 1.5rem; }
  .hero-badge { display: none; }
}

/* ─── TOUCH DEVICES — disable hover transforms ───────────────── */
@media (hover: none) and (pointer: coarse) {
  .project-card:hover,
  .blog-card:hover,
  .timeline-card:hover,
  .social-icon:hover,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }
  .project-card:hover { box-shadow: none; }
}

/* ─── LANDSCAPE PHONE ────────────────────────────────────────── */
@media (max-width: 812px) and (orientation: landscape) and (max-height: 430px) {
  #hero {
    min-height: auto;
    padding: calc(var(--nav-h) + 20px) 24px 40px;
  }
  #hero h1 { font-size: 2rem; }
  .hero-sub { display: none; }
  .blob-1, .blob-2 { opacity: 0.12; }
  .scroll-hint { display: none; }
}

/* ─── PRINT ──────────────────────────────────────────────────── */
@media print {
  #navbar, .hero-bg, .scroll-hint, .filter-tabs,
  .hero-social, .hero-cta, footer { display: none; }
  .section, #hero { padding: 32px 0; break-inside: avoid; }
  body { background: white; color: black; }
  .section-alt { background: #f5f5f5; }
}
