/* =========================================================
   NAITIK GARG — PORTFOLIO STYLESHEET
   Structure: Reset > Variables > Base > Utilities > Loader >
   Navbar > Hero > Sections > Components > Footer > Responsive
   ========================================================= */

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

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

:root {
  --primary: #00e5ff;
  --secondary: #6c63ff;
  --bg: #0b0f19;
  --bg-alt: #0e1424;
  --card: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.65);
  --text-dimmer: rgba(255, 255, 255, 0.45);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-width: 1180px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --nav-height: 76px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--primary); color: #06131a;
  padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  z-index: 9999; font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--primary), var(--secondary)); border-radius: 10px; }
* { scrollbar-width: thin; scrollbar-color: var(--secondary) var(--bg); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

.glass {
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.section { padding: 7rem 0; position: relative; }
.section-alt { background: var(--bg-alt); }

.section-eyebrow { font-family: var(--font-mono); color: var(--primary); font-size: 0.9rem; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 0.75rem; }
.section-subtitle { color: var(--text-dim); max-width: 560px; margin-bottom: 3rem; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: 50px;
  font-weight: 600; font-size: 0.95rem;
  position: relative; overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); }
.btn-icon { transition: transform 0.25s var(--ease); }
.btn:hover .btn-icon { transform: translateX(3px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #06131a;
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.25);
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(108, 99, 255, 0.4); }

.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--card-border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: rgba(0, 229, 255, 0.06); }

.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

/* ---------- LOADER ---------- */
.loader {
  position: fixed; inset: 0; background: var(--bg); z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { font-family: var(--font-mono); font-size: clamp(1rem, 3vw, 1.4rem); color: var(--primary); display: flex; gap: 0.5rem; }
.loader-prompt { color: var(--secondary); }
.loader-cursor { animation: blink 0.9s steps(1) infinite; }

/* ---------- SCROLL PROGRESS ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 9998; transition: width 0.1s linear;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  height: var(--nav-height); display: flex; align-items: center;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), height 0.3s var(--ease);
}
.navbar.scrolled {
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  height: 64px;
}

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

.logo { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; }
.logo-bracket { color: var(--secondary); }
.logo-accent { color: var(--primary); }

.nav-links { display: flex; gap: 2rem; }
.nav-link { font-size: 0.92rem; font-weight: 500; color: var(--text-dim); position: relative; padding: 0.4rem 0; transition: color 0.25s; }
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after, .nav-link:hover::after { width: 100%; }

.hamburger { display: none; flex-direction: column; gap: 5px; z-index: 1001; }
.hamburger span { width: 24px; height: 2px; background: var(--text); transition: transform 0.3s var(--ease), opacity 0.3s var(--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); }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding-top: var(--nav-height); overflow: hidden; }

.hero-bg { position: absolute; inset: 0; z-index: 0; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
}
.glow { position: absolute; width: 480px; height: 480px; border-radius: 50%; filter: blur(120px); opacity: 0.35; }
.glow-cyan { background: var(--primary); top: -10%; left: -8%; animation: floatGlow 12s ease-in-out infinite; }
.glow-purple { background: var(--secondary); bottom: -15%; right: -8%; animation: floatGlow 14s ease-in-out infinite reverse; }
@keyframes floatGlow { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40px, 30px); } }

.floating-symbol { position: absolute; font-family: var(--font-mono); color: rgba(255, 255, 255, 0.08); font-size: 3rem; font-weight: 600; user-select: none; }
.sym1 { top: 18%; left: 6%; animation: drift 9s ease-in-out infinite; }
.sym2 { bottom: 22%; left: 12%; font-size: 2.2rem; animation: drift 11s ease-in-out infinite 1s; }
.sym3 { top: 30%; right: 8%; font-size: 2.6rem; animation: drift 10s ease-in-out infinite 0.5s; }
.sym4 { bottom: 14%; right: 14%; animation: drift 8s ease-in-out infinite 1.5s; }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-18px) rotate(4deg); } }

.hero-container {
  position: relative; z-index: 1; max-width: var(--max-width); margin: 0 auto; padding: 2rem 1.5rem;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center;
}

.eyebrow { font-family: var(--font-mono); color: var(--primary); font-size: 0.95rem; margin-bottom: 1rem; opacity: 0; animation: fadeUp 0.7s var(--ease) 0.1s forwards; }

.hero-name {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  background: linear-gradient(135deg, #fff 40%, var(--primary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0; animation: fadeUp 0.7s var(--ease) 0.25s forwards;
}

.hero-typing {
  font-family: var(--font-mono); font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--secondary);
  min-height: 2.2rem; margin: 0.8rem 0 1.4rem;
  opacity: 0; animation: fadeUp 0.7s var(--ease) 0.4s forwards;
}
.cursor-blink { animation: blink 0.9s steps(1) infinite; color: var(--primary); }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc { color: var(--text-dim); max-width: 560px; margin-bottom: 2rem; opacity: 0; animation: fadeUp 0.7s var(--ease) 0.55s forwards; }

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; opacity: 0; animation: fadeUp 0.7s var(--ease) 0.7s forwards; }

.hero-socials { display: flex; gap: 1rem; opacity: 0; animation: fadeUp 0.7s var(--ease) 0.85s forwards; }
.social-icon {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--card-border); color: var(--text-dim);
  transition: all 0.3s var(--ease);
}
.social-icon:hover { color: var(--bg); background: linear-gradient(135deg, var(--primary), var(--secondary)); border-color: transparent; transform: translateY(-4px); }

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

.hero-image-wrap { display: flex; justify-content: center; opacity: 0; animation: fadeUp 0.9s var(--ease) 0.5s forwards; }
.hero-image-frame { position: relative; width: min(340px, 80vw); aspect-ratio: 1 / 1.05; animation: floatY 5s ease-in-out infinite; }
.hero-photo {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.orbit-badge {
  position: absolute; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  padding: 0.4rem 0.7rem; border-radius: 8px;
  background: var(--card); border: 1px solid var(--card-border); backdrop-filter: blur(10px);
  color: var(--primary); animation: floatY 4s ease-in-out infinite;
}
.badge-1 { top: 8%; left: -8%; animation-delay: 0.2s; }
.badge-2 { top: 42%; right: -10%; animation-delay: 0.6s; color: var(--secondary); }
.badge-3 { bottom: 6%; left: 2%; animation-delay: 1s; }

.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 1; }
.scroll-mouse { width: 26px; height: 40px; border: 2px solid var(--text-dimmer); border-radius: 20px; display: flex; justify-content: center; padding-top: 6px; }
.scroll-dot { width: 4px; height: 8px; background: var(--primary); border-radius: 4px; animation: scrollDot 1.6s ease-in-out infinite; }
@keyframes scrollDot { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3.5rem; }
.about-text p { color: var(--text-dim); margin-bottom: 1.2rem; }
.objective-card {
  margin-top: 1.5rem; padding: 1.5rem; border-radius: var(--radius-md);
  background: var(--card); border: 1px solid var(--card-border); border-left: 3px solid var(--primary);
}
.objective-card h3 { color: var(--primary); font-size: 1.05rem; margin-bottom: 0.6rem; }
.objective-card p { margin: 0; font-size: 0.95rem; }

.timeline-heading { font-size: 1.1rem; color: var(--text-dim); margin-bottom: 1.5rem; font-family: var(--font-mono); font-weight: 500; }
.mini-timeline { position: relative; padding-left: 1.6rem; border-left: 1px solid var(--card-border); }
.mini-timeline li { position: relative; padding-bottom: 2rem; }
.mini-timeline li:last-child { padding-bottom: 0; }
.mini-dot { position: absolute; left: -1.85rem; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.15); }
.mini-timeline h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.mini-timeline p { color: var(--text-dim); font-size: 0.9rem; }

/* ---------- SKILLS ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.skill-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-md); padding: 1.6rem;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.skill-card:hover { transform: translateY(-8px); border-color: rgba(0, 229, 255, 0.4); box-shadow: 0 16px 40px rgba(0, 229, 255, 0.12); }
.skill-top { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.1rem; }
.skill-icon { color: var(--primary); display: flex; transition: transform 0.35s var(--ease); }
.skill-card:hover .skill-icon { transform: rotate(-8deg) scale(1.1); color: var(--secondary); }
.skill-top h3 { font-size: 1.05rem; font-weight: 600; }
.progress-track { width: 100%; height: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width 1.4s var(--ease); }
.progress-label { display: block; margin-top: 0.6rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); }

/* ---------- PROJECTS ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.project-card {
  border-radius: var(--radius-md); overflow: hidden; background: var(--card); border: 1px solid var(--card-border);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.project-card:hover { transform: translateY(-10px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4); }
.project-image {
  aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--card-border);
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: rgba(255,255,255,0.18);
}
.proj-img-1 { background: linear-gradient(155deg, rgba(0, 229, 255, 0.14), rgba(108, 99, 255, 0.08)); }
.proj-img-2 { background: linear-gradient(155deg, rgba(108, 99, 255, 0.14), rgba(0, 229, 255, 0.08)); }
.proj-img-3 { background: linear-gradient(155deg, rgba(0, 229, 255, 0.1), rgba(108, 99, 255, 0.16)); }
.proj-img-4 { background: linear-gradient(155deg, rgba(108, 99, 255, 0.1), rgba(0, 229, 255, 0.16)); }
.proj-img-5 { background: linear-gradient(155deg, rgba(0, 229, 255, 0.16), rgba(108, 99, 255, 0.16)); }
.project-body { padding: 1.5rem; }
.project-body h3 { font-size: 1.15rem; margin-bottom: 0.6rem; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.status-pill {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; text-transform: uppercase;
  padding: 0.2rem 0.55rem; border-radius: 6px; background: rgba(108, 99, 255, 0.15); color: var(--secondary);
}
.project-body p { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 1rem; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.4rem; }
.tech-tags span {
  font-family: var(--font-mono); font-size: 0.75rem; padding: 0.3rem 0.65rem; border-radius: 6px;
  background: rgba(0, 229, 255, 0.08); color: var(--primary); border: 1px solid rgba(0, 229, 255, 0.2);
}
.project-links { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- CERTIFICATES ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.8rem; }
.cert-card {
  padding: 2rem 1.6rem; border-radius: var(--radius-md); background: var(--card); border: 1px solid var(--card-border);
  text-align: center; transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.cert-card:hover { transform: translateY(-8px) scale(1.02); border-color: rgba(108, 99, 255, 0.5); }
.cert-ribbon {
  width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(108, 99, 255, 0.15)); color: var(--primary);
}
.cert-card h3 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.cert-issuer { color: var(--text-dim); font-size: 0.85rem; }

/* ---------- TIMELINE ---------- */
.timeline { position: relative; max-width: 780px; margin: 0 auto; padding-left: 2rem; border-left: 2px solid var(--card-border); }
.timeline-item { position: relative; padding-bottom: 2.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute; left: -2.55rem; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); box-shadow: 0 0 0 5px rgba(0, 229, 255, 0.1);
}
.timeline-content { padding: 1.5rem 1.7rem; border-radius: var(--radius-md); }
.timeline-date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--primary); }
.timeline-content h3 { font-size: 1.1rem; margin: 0.4rem 0 0.2rem; }
.timeline-org { color: var(--secondary); font-size: 0.9rem; margin-bottom: 0.6rem; font-weight: 500; }
.timeline-content p:not(.timeline-org):not(.timeline-date) { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- CONTACT ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; }
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: var(--radius-md);
  background: var(--card); border: 1px solid var(--card-border); transition: all 0.3s var(--ease);
}
.contact-item:hover { border-color: var(--primary); transform: translateX(6px); }
.contact-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 229, 255, 0.1); color: var(--primary);
}
.contact-item h4 { font-size: 0.95rem; margin-bottom: 0.15rem; }
.contact-item p { color: var(--text-dim); font-size: 0.85rem; word-break: break-word; }

.contact-form { padding: 2rem; border-radius: var(--radius-lg); }
.form-group { margin-bottom: 1.4rem; position: relative; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.5rem; font-family: var(--font-mono); }
.form-group input, .form-group textarea {
  width: 100%; padding: 0.85rem 1rem; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--card-border); color: var(--text);
  transition: border-color 0.25s, box-shadow 0.25s; resize: vertical;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-dimmer); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12); outline: none; }
.form-group.invalid input, .form-group.invalid textarea { border-color: #ff5470; }
.error-msg { display: block; min-height: 1.1rem; font-size: 0.8rem; color: #ff5470; margin-top: 0.35rem; }
.form-success { margin-top: 1rem; text-align: center; color: var(--primary); font-size: 0.9rem; min-height: 1.2rem; }
.form-note { margin-top: 0.6rem; text-align: center; color: var(--text-dimmer); font-size: 0.75rem; }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--card-border); padding: 2.5rem 0; background: var(--bg-alt); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; text-align: center; }
.footer-socials { display: flex; gap: 1rem; }
.footer-copy { color: var(--text-dimmer); font-size: 0.85rem; }

/* ---------- BACK TO TOP ---------- */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #06131a;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 229, 255, 0.3);
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: all 0.35s var(--ease); z-index: 900;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .hero-container { grid-template-columns: 1fr; text-align: center; padding-top: 1rem; }
  .hero-desc { margin-inline: auto; }
  .hero-buttons, .hero-socials { justify-content: center; }
  .hero-image-wrap { order: -1; }
  .hero-image-frame { width: min(260px, 60vw); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(72vw, 320px);
    background: rgba(11, 15, 25, 0.97); backdrop-filter: blur(20px);
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.8rem;
    padding: 2rem; transform: translateX(100%); transition: transform 0.4s var(--ease);
    border-left: 1px solid var(--card-border);
  }
  .nav-links.open { transform: translateX(0); }
  .hamburger { display: flex; }
  .section { padding: 5rem 0; }
}

@media (max-width: 520px) {
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .timeline { padding-left: 1.5rem; }
  .timeline-marker { left: -2.05rem; }
  .back-to-top { right: 1rem; bottom: 1rem; width: 42px; height: 42px; }
}