/* =============================================================
   Tedy Rediantoro — Portfolio
   style.css
   Sections:
   1. CSS Variables (dark default + light theme)
   2. Reset & base
   3. Utility / layout
   4. Background decor (blobs + particles)
   5. Navbar
   6. Buttons
   7. Hero
   8. About
   9. Skills
   10. Projects
   11. Timeline
   12. Contact
   13. Footer + misc
   14. Keyframe animations
   15. Responsive
============================================================= */

/* ---------- 1. CSS VARIABLES ---------- */
:root {
  /* Dark mode (default) */
  --bg:          #0a0e1a;
  --bg-alt:      #0f1424;
  --surface:     rgba(255, 255, 255, 0.04);
  --surface-2:   rgba(255, 255, 255, 0.06);
  --border:      rgba(255, 255, 255, 0.09);
  --text:        #e8ecf5;
  --text-muted:  #97a0b5;
  --heading:     #ffffff;

  --accent-1:    #22d3ee;   /* neon cyan  */
  --accent-2:    #a855f7;   /* purple     */
  --accent-3:    #6366f1;   /* indigo     */
  --gradient:    linear-gradient(135deg, #22d3ee 0%, #6366f1 50%, #a855f7 100%);
  --glow:        0 0 40px rgba(99, 102, 241, 0.35);

  --nav-bg:      rgba(10, 14, 26, 0.55);
  --shadow:      0 20px 50px rgba(0, 0, 0, 0.45);
  --radius:      18px;
  --radius-sm:   12px;

  --font-head:   'Poppins', sans-serif;
  --font-body:   'Inter', sans-serif;
  --maxw:        1180px;
}

/* Light theme overrides */
html[data-theme="light"] {
  --bg:          #f4f6fb;
  --bg-alt:      #ffffff;
  --surface:     rgba(15, 23, 42, 0.03);
  --surface-2:   rgba(15, 23, 42, 0.05);
  --border:      rgba(15, 23, 42, 0.10);
  --text:        #26314a;
  --text-muted:  #5c6780;
  --heading:     #0f172a;

  --nav-bg:      rgba(255, 255, 255, 0.65);
  --shadow:      0 20px 50px rgba(80, 90, 130, 0.18);
  --glow:        0 0 40px rgba(99, 102, 241, 0.18);
}

/* ---------- 2. RESET & BASE ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--heading); line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ---------- 3. UTILITY / LAYOUT ---------- */
.container { width: 92%; max-width: var(--maxw); margin: 0 auto; }

.section { padding: 110px 0; position: relative; }

.section-head { text-align: center; margin-bottom: 60px; }
.section-tag {
  display: inline-block;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent-1);
  padding: 6px 16px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface); margin-bottom: 16px;
}
.section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }

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

/* ---------- 4. BACKGROUND DECOR ---------- */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
  animation: floatBlob 18s ease-in-out infinite;
}
.blob-1 { width: 480px; height: 480px; background: #22d3ee; top: -120px; left: -100px; }
.blob-2 { width: 520px; height: 520px; background: #a855f7; bottom: -160px; right: -120px; animation-delay: -6s; }
.blob-3 { width: 380px; height: 380px; background: #6366f1; top: 40%; left: 55%; animation-delay: -12s; }
html[data-theme="light"] .blob { opacity: 0.22; }

.particles { position: absolute; inset: 0; }
.particle {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-1); opacity: 0.5;
  animation: rise linear infinite;
}

/* ---------- 5. NAVBAR ---------- */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 18px 0; transition: all 0.35s ease;
}
.navbar.scrolled {
  padding: 12px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; }
.logo-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--gradient); color: #fff; font-weight: 800; font-size: 0.95rem;
  box-shadow: var(--glow);
}
.logo-text { font-size: 1.05rem; color: var(--heading); }

.nav-links { display: flex; gap: 6px; }
.nav-link {
  position: relative; padding: 8px 14px; font-weight: 500; font-size: 0.95rem;
  color: var(--text-muted); border-radius: 8px; transition: color 0.25s ease;
}
.nav-link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--gradient); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease; border-radius: 2px;
}
.nav-link:hover, .nav-link.active { color: var(--heading); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.nav-controls { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--heading);
  position: relative; transition: background 0.25s ease, transform 0.25s ease;
}
.theme-toggle:hover { transform: translateY(-2px); background: var(--surface-2); }
.theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.hamburger { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  align-items: center; justify-content: center; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--heading); border-radius: 2px; transition: all 0.3s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 6. BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(99,102,241,0.5); }
.btn-outline { border: 1.5px solid var(--border); color: var(--heading); background: var(--surface); }
.btn-outline:hover { transform: translateY(-3px); border-color: var(--accent-1); color: var(--accent-1); }
.btn-block { width: 100%; justify-content: center; }

.btn-sm { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; padding: 8px 14px; border-radius: 999px; transition: all 0.25s ease; }
.btn-sm.btn-primary { background: var(--gradient); color: #fff; }
.btn-sm.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-sm.btn-ghost:hover { color: var(--accent-1); border-color: var(--accent-1); }

/* ---------- 7. HERO ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 120px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 40px; }

.hero-greeting { font-size: 1.05rem; color: var(--text-muted); font-weight: 500; margin-bottom: 10px; }
.wave { display: inline-block; animation: wave 2.2s ease-in-out infinite; transform-origin: 70% 70%; }
.hero-title { font-size: clamp(2.2rem, 5.2vw, 3.7rem); font-weight: 900; margin-bottom: 8px; }
.hero-typed { font-size: clamp(1.2rem, 3vw, 1.9rem); font-weight: 600; color: var(--text-muted); margin-bottom: 20px; min-height: 1.6em; }
.hero-typed .typed-prefix { color: var(--text-muted); }
.hero-typed .typed-text { color: var(--accent-1); }
.typed-cursor { color: var(--accent-2); font-weight: 400; animation: blink 1s step-end infinite; }
.hero-sub { max-width: 520px; color: var(--text-muted); font-size: 1.02rem; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }

.hero-socials { display: flex; gap: 14px; }
.hero-socials a, .contact-socials a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 1.05rem; transition: all 0.28s ease;
}
.hero-socials a:hover, .contact-socials a:hover {
  color: #fff; background: var(--gradient); transform: translateY(-4px) scale(1.08); box-shadow: var(--glow);
}

/* Hero visual / avatar */
.hero-visual { display: grid; place-items: center; }
.avatar-art { position: relative; width: 340px; height: 340px; display: grid; place-items: center; }
.avatar-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.15);
  animation: spin 22s linear infinite;
}
.avatar-blob {
  position: absolute; width: 78%; height: 78%;
  background: var(--gradient);
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  filter: blur(2px); opacity: 0.9;
  box-shadow: var(--glow);
  animation: morph 8s ease-in-out infinite;
}
.avatar-face {
  position: relative; z-index: 2; width: 55%; height: 55%; border-radius: 50%;
  display: grid; place-items: center; font-size: 5rem; color: #fff;
  background: rgba(10,14,26,0.35); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
}
.chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 600; padding: 8px 13px; border-radius: 999px;
  background: var(--nav-bg); backdrop-filter: blur(10px);
  border: 1px solid var(--border); color: var(--heading);
  box-shadow: var(--shadow); animation: floatChip 5s ease-in-out infinite;
}
.chip i { color: var(--accent-1); }
.chip-1 { top: 8%; left: -18px; }
.chip-2 { bottom: 14%; left: -30px; animation-delay: -1.6s; }
.chip-3 { top: 40%; right: -34px; animation-delay: -3.2s; }

.scroll-down { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); }
.mouse { display: block; width: 26px; height: 42px; border: 2px solid var(--text-muted); border-radius: 14px; position: relative; }
.wheel { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; background: var(--accent-1); border-radius: 4px; animation: wheel 1.6s ease infinite; }

/* ---------- 8. ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 50px; align-items: center; }
.about-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.about-photo {
  position: relative; height: 300px; border-radius: var(--radius-sm);
  background: var(--gradient); display: grid; place-items: center;
  font-size: 6rem; color: rgba(255,255,255,0.9); margin-bottom: 24px; overflow: hidden;
}
.about-photo::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.25), transparent 60%); }
.about-photo-badge {
  position: absolute; bottom: 14px; left: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; background: rgba(10,14,26,0.6); color: #fff;
  backdrop-filter: blur(8px);
}
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: center; }
.stat { padding: 12px 6px; border-radius: var(--radius-sm); background: var(--surface-2); }
.stat-num { font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; color: var(--heading); }
.stat-plus { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--accent-1); }
.stat-label { display: block; font-size: 0.76rem; color: var(--text-muted); margin-top: 4px; }

.about-story h3 { font-size: 1.55rem; margin-bottom: 18px; }
.about-story p { color: var(--text-muted); margin-bottom: 16px; }
.about-interests { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 26px; }
.about-interests li { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500;
  padding: 8px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.about-interests i { color: var(--accent-1); }

/* ---------- 9. SKILLS ---------- */
.skill-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 60px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 26px 16px; text-align: center; transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.skill-card i { font-size: 2rem; margin-bottom: 12px;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.skill-card h4 { font-size: 0.92rem; font-weight: 600; }
.skill-card:hover { transform: translateY(-8px); border-color: var(--accent-2); box-shadow: var(--shadow); }

.skill-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 48px; }
.skill-bar-head { display: flex; justify-content: space-between; font-weight: 500; margin-bottom: 8px; font-size: 0.95rem; }
.skill-pct { color: var(--accent-1); font-weight: 600; }
.skill-track { height: 9px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.skill-fill { height: 100%; width: 0; border-radius: 999px; background: var(--gradient); transition: width 1.3s cubic-bezier(0.22,1,0.36,1); }

/* ---------- 10. PROJECTS ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 44px; }
.filter-btn {
  padding: 9px 20px; border-radius: 999px; font-weight: 500; font-size: 0.9rem;
  color: var(--text-muted); background: var(--surface); border: 1px solid var(--border);
  transition: all 0.28s ease;
}
.filter-btn:hover { color: var(--heading); border-color: var(--accent-1); }
.filter-btn.active { color: #fff; background: var(--gradient); border-color: transparent; box-shadow: var(--glow); }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.project-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
}
.project-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: var(--shadow); }
.project-card.hide { display: none; }
.project-thumb {
  height: 170px; display: grid; place-items: center; font-size: 3.4rem; color: rgba(255,255,255,0.92);
  position: relative; overflow: hidden;
}
.project-thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 20%, rgba(255,255,255,0.25), transparent 55%); }
.thumb-1 { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.thumb-2 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.thumb-3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.thumb-4 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.thumb-5 { background: linear-gradient(135deg, #6366f1, #a855f7); }
.thumb-6 { background: linear-gradient(135deg, #14b8a6, #22c55e); }
.project-body { padding: 22px; }
.project-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.project-body p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.tags span { font-size: 0.72rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); color: var(--accent-1); border: 1px solid var(--border); }
.project-links { display: flex; gap: 10px; }

/* ---------- 11. TIMELINE ---------- */
.timeline { position: relative; max-width: 880px; margin: 0 auto; padding: 20px 0; }
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 3px; background: linear-gradient(var(--accent-1), var(--accent-2)); border-radius: 3px;
}
.tl-item { position: relative; width: 50%; padding: 18px 44px; }
.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; }
.tl-dot {
  position: absolute; top: 26px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 1rem;
  background: var(--gradient); box-shadow: var(--glow); z-index: 2;
}
.tl-item:nth-child(odd) .tl-dot { right: -23px; }
.tl-item:nth-child(even) .tl-dot { left: -23px; }
.tl-content {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: transform 0.3s ease, border-color 0.3s ease;
}
.tl-content:hover { transform: translateY(-5px); border-color: var(--accent-2); }
.tl-date { display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--accent-1);
  padding: 4px 12px; border-radius: 999px; background: var(--surface-2); margin-bottom: 10px; }
.tl-content h3 { font-size: 1.15rem; }
.tl-org { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text); margin: 3px 0 10px; }
.tl-content p { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- 12. CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.info-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 20px; transition: transform 0.3s ease, border-color 0.3s ease;
}
.info-card:hover { transform: translateX(6px); border-color: var(--accent-1); }
.info-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px;
  background: var(--gradient); color: #fff; font-size: 1.2rem; flex-shrink: 0; box-shadow: var(--glow); }
.info-card h4 { font-size: 0.95rem; }
.info-card p { font-size: 0.9rem; color: var(--text-muted); }
.contact-socials { display: flex; gap: 12px; margin-top: 6px; }

.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.88rem; font-weight: 500; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm);
  background: var(--bg-alt); border: 1px solid var(--border); color: var(--text);
  font-size: 0.95rem; transition: border-color 0.25s ease, box-shadow 0.25s ease; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(34,211,238,0.15); }
.field.invalid input, .field.invalid textarea { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.error-msg { display: block; color: #f87171; font-size: 0.78rem; margin-top: 5px; min-height: 1em; }

/* ---------- 13. FOOTER + MISC ---------- */
.footer { padding: 50px 0 40px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.footer-thanks { color: var(--text-muted); }
.footer-copy { font-size: 0.88rem; color: var(--text-muted); }

.to-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 900;
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--gradient); color: #fff; box-shadow: var(--glow);
  opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.35s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-4px); }

.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(120px);
  z-index: 1100; display: flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px; font-weight: 600;
  background: #10b981; color: #fff; box-shadow: 0 12px 34px rgba(16,185,129,0.4);
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- 14. KEYFRAMES ---------- */
@keyframes floatBlob {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 25px) scale(0.95); }
}
@keyframes rise {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-110vh); opacity: 0; }
}
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-8deg); } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes morph {
  0%,100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
  50% { border-radius: 58% 42% 39% 61% / 57% 63% 37% 43%; }
}
@keyframes floatChip { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes wheel { 0% { top: 8px; opacity: 1; } 100% { top: 22px; opacity: 0; } }

/* ---------- 15. RESPONSIVE ---------- */
@media (max-width: 992px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 50px; }
  .hero-text { order: 2; }
  .hero-visual { order: 1; }
  .hero-cta, .hero-socials { justify-content: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .skill-cards { grid-template-columns: repeat(3, 1fr); }
  .skill-bars { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .nav-links {
    position: fixed; top: 0; right: -100%; height: 100vh; width: 74%; max-width: 320px;
    flex-direction: column; justify-content: center; gap: 18px; padding: 40px;
    background: var(--bg-alt); border-left: 1px solid var(--border);
    box-shadow: -20px 0 50px rgba(0,0,0,0.4); transition: right 0.4s ease; z-index: 1050;
  }
  .nav-links.open { right: 0; }
  .nav-link { font-size: 1.1rem; }
  .hamburger { display: flex; }

  /* timeline collapses to single column */
  .timeline::before { left: 22px; }
  .tl-item, .tl-item:nth-child(odd), .tl-item:nth-child(even) { width: 100%; left: 0; text-align: left; padding: 18px 0 18px 60px; }
  .tl-item:nth-child(odd) .tl-dot, .tl-item:nth-child(even) .tl-dot { left: 0; right: auto; }
}

@media (max-width: 520px) {
  .skill-cards { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-num { font-size: 1.4rem; }
  .avatar-art { width: 280px; height: 280px; }
  .logo-text { display: none; }
}
