/* ============================================================
   PORTFOLIO — Pratik Nawale
   Palette: Deep Navy (#111c30) | Teal Accent (#10B981)
            Coral Accent (#E74C3C) | Off-white (#F5F5F5)
   Fonts : DM Serif Display (headings), Inter (body)
   ============================================================ */

/* ---------- CSS Variables (Dark by default) ---------- */
:root {
  /* Colours */
  --primary: #10B981;
  --primary-hover: #0d9668;
  --accent: #E74C3C;
  --bg: #0b1120;
  --bg-card: #111c30;
  --bg-nav: rgba(11, 17, 32, 0.85);
  --surface: #162033;
  --text: #e4e8ef;
  --text-muted: #94a3b8;
  --border: #1e2d45;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);

  /* Typography */
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --section-pad: clamp(4rem, 8vw, 7rem) 0;
  --container-w: min(1140px, 90vw);

  /* Transitions */
  --transition: 0.3s ease;
}

/* ---------- Light Theme ---------- */
[data-theme="light"] {
  --bg: #f5f5f5;
  --bg-card: #ffffff;
  --bg-nav: rgba(245, 245, 245, 0.9);
  --surface: #eef1f6;
  --text: #1a1a2e;
  --text-muted: #555e6e;
  --border: #d4d8e0;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--primary-hover); }

img { max-width: 100%; display: block; }
ul { list-style: none; }

/* Skip-to-content link (a11y) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  color: #fff;
}

.container { width: var(--container-w); margin: 0 auto; }

.section { padding: var(--section-pad); }

/* ---------- Section Title ---------- */
.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 3rem;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn--outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn--outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ==========================
   NAVIGATION
   ========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.nav__inner {
  width: var(--container-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text);
  font-weight: 700;
}

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

.accent-dot { color: var(--primary); }

.nav__links {
  display: flex;
  gap: 2rem;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 2px;
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--primary);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle */
.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Show/hide sun/moon */
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav__hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================
   HERO
   ========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 0 4rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 40%, rgba(16, 185, 129, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 60%, rgba(231, 76, 60, 0.08) 0%, transparent 70%),
    var(--bg);
  z-index: -1;
  transition: background var(--transition);
}

[data-theme="light"] .hero__bg {
  background:
    radial-gradient(ellipse 60% 50% at 20% 40%, rgba(16, 185, 129, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 60%, rgba(231, 76, 60, 0.06) 0%, transparent 70%),
    var(--bg);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: var(--container-w);
  margin: 0 auto;
}

.hero__greeting {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.hero__name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero__title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  min-height: 2rem;
}

.hero__title .typed-cursor {
  color: var(--primary);
  font-weight: 300;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 2rem;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero__socials {
  display: flex;
  gap: 1rem;
}

.hero__socials a {
  color: var(--text-muted);
  transition: color var(--transition), transform 0.15s ease;
}

.hero__socials a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  right: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 3rem;
  background: var(--primary);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.4; }
}

/* ==========================
   ABOUT
   ========================== */
.about__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__text p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.about__text strong {
  color: var(--text);
}

.about__highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s ease, border-color var(--transition), background var(--transition);
}

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

.highlight-card__number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--primary);
  line-height: 1.2;
}

.highlight-card__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
}

/* ==========================
   SKILLS
   ========================== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color var(--transition), background var(--transition);
}

.skill-group:hover { border-color: var(--primary); }

.skill-group__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags li {
  background: var(--surface);
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.skill-tags li:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================
   PROJECTS
   ========================== */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

.project-card__links {
  display: flex;
  gap: 0.75rem;
}

.project-card__links a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.project-card__links a:hover { color: var(--primary); }

.project-card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.project-card__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-card__tech li {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.project-card__tech li:not(:last-child)::after {
  content: ' ·';
  margin-left: 0.4rem;
}

/* ==========================
   EXPERIENCE / TIMELINE
   ========================== */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

/* Static background track */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0.5rem;
  width: 2px;
  height: 100%;
  background: var(--border);
}

/* Scroll-driven progress overlay — height set by JS */
.timeline::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0.5rem;
  width: 2px;
  height: var(--tl-progress, 0px);
  background: var(--primary);
  /* no transition — follows scroll in real time */
}

.timeline__item {
  position: relative;
  margin-bottom: 2.5rem;
}

/* Marker — scale-in on reveal, scale-out on leave */
.timeline__marker {
  position: absolute;
  left: -2.15rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  z-index: 1;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline__item.in-view .timeline__marker {
  transform: scale(1);
}

/* Pulse ring — fires each time item enters view */
.timeline__marker::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
}

.timeline__item.in-view .timeline__marker::after {
  animation: markerPulse 0.6s 0.25s ease-out forwards;
}

@keyframes markerPulse {
  0%   { transform: scale(0.7); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

.timeline__date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
  letter-spacing: 0.5px;
}

.timeline__role {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}

.timeline__company {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timeline__details {
  padding-left: 1.2rem;
  list-style: disc;
}

.timeline__details li {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  line-height: 1.6;
}

/* ==========================
   CERTIFICATIONS
   ========================== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.cert-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  transition: transform 0.2s ease, border-color var(--transition), background var(--transition);
}

.cert-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  color: var(--text);
}

.cert-card__ext {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.cert-card:hover .cert-card__ext {
  opacity: 1;
  color: var(--primary);
}

.cert-card__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.cert-card__issuer {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================
   CONTACT
   ========================== */
.contact {
  position: relative;
  overflow: hidden;
}

/* Decorative gradient blob */
.contact__blob {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

[data-theme="light"] .contact__blob {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
}

/* Two-column grid */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
  position: relative;
  z-index: 1;
}

.contact__intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 420px;
}

/* Social icon cards */
.contact__cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: var(--text);
}

.contact-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.10);
}

.contact-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.10);
  color: var(--primary);
  transition: background 0.25s ease;
}

.contact-card:hover .contact-card__icon {
  background: rgba(16, 185, 129, 0.18);
}

.contact-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-card__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.contact-card__value {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Glassmorphism form card */
.contact__form-wrap {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: relative;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Gradient top border accent */
.contact__form-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

[data-theme="light"] .contact__form-wrap {
  background: rgba(255, 255, 255, 0.6);
}

.contact__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group--full {
  grid-column: 1 / -1;
}

/* Floating labels */
.form-group--float {
  position: relative;
}

.form-group--float input,
.form-group--float textarea {
  width: 100%;
  padding: 1.3rem 1rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
}

.form-group--float textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 300px;
}

.form-group--float label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.92rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.2s ease;
  background: transparent;
  padding: 0 0.15rem;
}

/* Label for textarea — start at top */
.form-group--float textarea ~ label {
  top: 1rem;
  transform: translateY(0);
}

/* Float up on focus or when filled (placeholder-shown trick) */
.form-group--float input:focus ~ label,
.form-group--float input:not(:placeholder-shown) ~ label {
  top: 0.45rem;
  transform: translateY(0);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.03em;
}

.form-group--float textarea:focus ~ label,
.form-group--float textarea:not(:placeholder-shown) ~ label {
  top: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.03em;
}

/* Focus ring */
.form-group--float input:focus,
.form-group--float textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

/* Send button with plane icon */
.btn--send {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: start;
}

.btn__plane {
  transition: transform 0.3s ease;
}

.btn--send:hover .btn__plane {
  transform: translate(4px, -3px);
}

.form-status {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.form-status--success { color: var(--primary); }
.form-status--error { color: var(--accent); }

/* ==========================
   FOOTER
   ========================== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__views {
  margin-left: 0.5rem;
  opacity: 0.5;
  font-size: 0.8rem;
}

.footer__views::before {
  content: '\00b7 ';
}

/* ==========================
   SCROLL-REVEAL ANIMATIONS
   ========================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================
   RESPONSIVE
   ========================== */
@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__highlights {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  /* Remove backdrop-filter on mobile nav — it creates a containing
     block that traps position:fixed children inside the 4rem header */
  .nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
  }

  .nav__links {
    position: fixed;
    inset: 0;
    background: rgba(11, 17, 32, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 4vh, 1.75rem);
    padding: 4rem 0 2rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s ease, visibility 0.35s;
    z-index: 999;
    pointer-events: none;
    visibility: hidden;
  }

  [data-theme="light"] .nav__links {
    background: rgba(245, 245, 245, 0.78);
  }

  .nav__links.open {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
  }

  .nav__links a {
    font-size: clamp(1rem, 3vh, 1.25rem);
  }

  .nav__hamburger {
    display: flex;
    z-index: 1001;
  }

  .hero__scroll { display: none; }

  .about__highlights {
    grid-template-columns: 1fr 1fr;
  }

  .contact__form {
    grid-template-columns: 1fr;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .hero__name {
    font-size: 2.2rem;
  }

  .hero__cta {
    flex-direction: column;
  }

  .hero__cta .btn {
    text-align: center;
  }

  .about__highlights {
    grid-template-columns: 1fr 1fr;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .contact__form-wrap {
    padding: 1.25rem;
  }

  .contact-card__value {
    font-size: 0.8rem;
  }
}

/* ==========================
   1. SCROLL PROGRESS BAR
   ========================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary);
  z-index: 1100;
  transition: none;
  pointer-events: none;
}

/* ==========================
   2. CUSTOM CURSOR (desktop)
   ========================== */
.cursor,
.cursor-ring {
  display: none;
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  z-index: 9999;
  transition: opacity 0.2s;
}

@media (hover: hover) and (pointer: fine) {
  html { cursor: none !important; }
  a, button, input, textarea, label, .project-card, .cert-card, .highlight-card, .skill-tags li {
    cursor: none !important;
  }

  .cursor {
    display: block;
    width: 8px;
    height: 8px;
    background: var(--primary);
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
  }

  .cursor-ring {
    display: block;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--primary);
    opacity: 0.5;
    transform: translate(-50%, -50%);
    transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease, background 0.25s ease;
  }

  .cursor-ring.hover {
    width: 52px;
    height: 52px;
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.08);
    opacity: 1;
  }
}

/* ==========================
   3. STATUS DOT (Open to opportunities)
   ========================== */
.status-dot {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 10px;
  height: 10px;
  margin-left: 0.5rem;
}

.status-dot__core {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  position: absolute;
}

.status-dot__ping {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: statusPing 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes statusPing {
  0%   { transform: scale(1); opacity: 0.75; }
  75%, 100% { transform: scale(2.5); opacity: 0; }
}

/* ==========================
   4. HERO PARTICLE CANVAS
   ========================== */
.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ==========================
   5. STAGGERED HERO ENTRANCE
   ========================== */
.hero-enter {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-enter.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================
   6. 3D TILT ON PROJECT CARDS
   ========================== */
.project-card {
  transform-style: preserve-3d;
  /* perspective is applied via JS inline */
}

/* Subtle inner glow on tilt hover */
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(16,185,129,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.project-card:hover::before {
  opacity: 1;
}

/* ==========================
   7. COMMAND PALETTE
   ========================== */
.palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.palette-overlay.open {
  opacity: 1;
  visibility: visible;
}

.palette {
  width: min(520px, 90vw);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.2s ease;
}

.palette-overlay.open .palette {
  transform: translateY(0) scale(1);
}

.palette__search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.palette__search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.palette__search input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.palette__search kbd {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
}

.palette__results {
  max-height: 320px;
  overflow-y: auto;
}

.palette__results li {
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.palette__results li:hover,
.palette__results li.active {
  background: var(--surface);
  color: var(--primary);
}

.palette__results li.hidden {
  display: none;
}

/* Hide cursor & palette on mobile */
@media (max-width: 768px) {
  .cursor, .cursor-ring { display: none !important; }
  .palette__search kbd { display: none; }
}

/* ==========================
   BACK TO TOP BUTTON
   ========================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-hover);
}

/* ==========================
   BODY SCROLL LOCK (mobile nav)
   ========================== */
body.nav-open {
  overflow: hidden;
}

/* ==========================
   PREFERS REDUCED MOTION
   ========================== */
@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-enter {
    opacity: 1;
    transform: none;
  }

  .hero__particles {
    display: none;
  }
}

