/* ════════════════════════════════════════════
   DESIGN TOKENS
════════════════════════════════════════════ */
:root {
  --bg: #fafaf8;
  --bg-alt: #f3f3f0;
  --surface: #ffffff;
  --hero: #060d0e;
  --text: #0d0d0d;
  --muted: #6b7070;
  --border: rgba(0, 0, 0, 0.07);
  --accent: #08a8b0;
  --accent-dark: #068a92;
  --accent-soft: #ddf3f5;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-full: 999px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.10);
  --transition: 0.25s ease;
}

/* ════════════════════════════════════════════
   RESET & BASE  (mobile-first)
════════════════════════════════════════════ */

section {
  scroll-margin-top: 64px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Outfit", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

body.intro-active {
  overflow: hidden;
}

body.intro-active .site-shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(28px);
}

body.intro-complete .site-shell {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.site-shell {
  transition: opacity 0.65s ease, transform 0.65s ease, visibility 0.65s ease;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  line-height: 1.1;
}

/* ════════════════════════════════════════════
   UTILITIES
════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-pad {
  padding: 5rem 0;
}

.bg-alt {
  background: var(--bg-alt);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-family: "Space Grotesk", sans-serif;
}

.section-label::before {
  content: "";
  display: block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 2.5rem;
  line-height: 1.08;
}

/* ════════════════════════════════════════════
   INTRO / LANDING SCREEN
════════════════════════════════════════════ */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ecebea;
  padding: 1.5rem;
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 0.7s ease;
}

body.intro-complete .intro-screen {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  pointer-events: none;
}

.intro-inner {
  text-align: left;
  animation: fadeUp 0.85s ease both;
}

.intro-tag {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.intro-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.2rem, 13vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
  color: #0d0d0d;
  margin-bottom: 1.5rem;
}

.intro-role {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.intro-role .sep {
  margin: 0 0.5rem;
  color: var(--accent);
}

.intro-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border: 2px solid var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.intro-cta:hover {
  background: var(--text);
  color: #fff;
  transform: translateY(-2px);
}

.intro-cta i {
  transition: transform var(--transition);
}

.intro-cta:hover i {
  transform: translateX(4px);
}

.intro-location {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════
   HEADER / NAV
════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9990;
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.header.scrolled {
  background: rgba(6, 13, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
}

.brand-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 3px;
  flex-shrink: 0;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.3rem;
  cursor: pointer;
  margin-left: auto;
  transition: color var(--transition);
}

.navmenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(6, 13, 14, 0.97);
  backdrop-filter: blur(20px);
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.navmenu.open {
  display: block;
}

.navmenu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.navmenu a {
  display: block;
  padding: 0.65rem 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: color var(--transition);
}

.navmenu a:hover,
.navmenu a.active {
  color: #fff;
}

/* ════════════════════════════════════════════
   HERO
════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 45% 40%, rgba(8, 168, 176, 0.15), transparent 40%),
    radial-gradient(circle at 15% 70%, rgba(4, 80, 85, 0.18), transparent 35%),
    linear-gradient(140deg, #060d0e 0%, #0b1c1e 50%, #040909 100%);
  overflow: hidden;
}

.hero-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 7rem 1.25rem 5rem;
}

/* Big name watermark */
.hero-name-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem 0.5rem;
}

.hn-first,
.hn-last {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(4rem, 20vw, 14rem);
  font-weight: 800;
  letter-spacing: -0.08em;
  text-transform: uppercase;
  line-height: 0.85;
  color: rgba(232, 236, 234, 0.07);
  white-space: nowrap;
}

.hn-last {
  align-self: center;
}

/* Portrait */
.hero-portrait {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.hero-portrait img {
  height: min(80svh, 700px);
  width: auto;
  max-width: 90vw;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.7)) saturate(0.9);
}

@media (max-width: 767px) {
  .hero-portrait {
    align-items: center;
  }

  .hero-portrait img {
    width: 100%;
    height: 100svh;
    max-width: none;
    object-fit: cover;
    object-position: center center;
  }
}

/* Bottom row */
.hero-bottom {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-social {
  display: flex;
  gap: 0.75rem;
}

.hero-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: rgba(232, 236, 234, 0.8);
  font-size: 1.1rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.hero-social a:hover {
  background: rgba(8, 168, 176, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 236, 234, 0.55);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.role-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.6;
}

.role-chip.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(8, 168, 176, 0.08);
}

.role-chip.active::before {
  opacity: 1;
}

/* Scroll hint */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.45);
  font-size: 1rem;
  animation: bounce 2s ease-in-out infinite;
  z-index: 3;
}

/* ════════════════════════════════════════════
   ABOUT
════════════════════════════════════════════ */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.about-lead {
  font-size: 1.08rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.about-body {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.75rem;
}

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

.about-tags span {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  border: 1px solid rgba(8, 168, 176, 0.2);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-dark);
}

/* Info cards */
.about-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.info-icon {
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ic-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.ic-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.ic-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}

.ic-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ════════════════════════════════════════════
   SKILLS
════════════════════════════════════════════ */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.skill-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

.skill-cat {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

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

.skill-pills span {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.skill-pills span:hover {
  background: var(--accent-soft);
  border-color: rgba(8, 168, 176, 0.3);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.accent-pills span {
  background: rgba(8, 168, 176, 0.06);
  border-color: rgba(8, 168, 176, 0.18);
  color: var(--accent-dark);
}

.accent-pills span:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ════════════════════════════════════════════
   PROJECTS
════════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Project card */
.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.proj-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.proj-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1c1e, #0e2426);
}

.proj-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.proj-card:hover .proj-img img {
  transform: scale(1.04);
}

.proj-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.proj-type {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.proj-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.proj-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.proj-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.proj-tech span {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}

.proj-links {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.proj-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: var(--text);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: "Space Grotesk", sans-serif;
  transition: background var(--transition), transform var(--transition);
}

.proj-btn:hover {
  background: #222;
  transform: translateY(-1px);
}

.proj-btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.proj-btn-ghost:hover {
  background: var(--bg-alt);
  border-color: var(--text);
}

/* Featured project */
.proj-featured {
  border-color: rgba(8, 168, 176, 0.25);
  position: relative;
}

.proj-featured::before {
  content: "Featured";
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════
   CERTIFICATIONS
════════════════════════════════════════════ */
.certs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.cert-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.cert-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.cert-icon {
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.cert-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.cert-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ════════════════════════════════════════════
   CONTACT
════════════════════════════════════════════ */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

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

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  color: inherit;
}

a.contact-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.contact-icon-wrap {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 1.1rem;
  flex-shrink: 0;
}

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

.contact-val {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.contact-socials {
  display: flex;
  gap: 0.75rem;
}

.contact-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  font-size: 1.1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}

.contact-socials a:hover {
  color: var(--accent-dark);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* Contact form */
.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: "Outfit", sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 168, 176, 0.12);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.9rem 1.75rem;
  background: var(--text);
  color: #fff;
  border: 0;
  border-radius: var(--radius-full);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.submit-btn:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
}

.submit-btn i {
  transition: transform var(--transition);
}

.submit-btn:hover i {
  transform: translateX(3px);
}

/* ════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════ */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.footer p {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ════════════════════════════════════════════
   SCROLL TOP
════════════════════════════════════════════ */
.scroll-top {
  position: fixed;
  right: 1rem;
  bottom: -60px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: bottom 0.3s ease, opacity 0.3s ease, visibility 0.3s ease, transform var(--transition);
  z-index: 9980;
}

.scroll-top.active {
  bottom: 1.25rem;
  opacity: 1;
  visibility: visible;
}

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

/* ════════════════════════════════════════════
   PRELOADER
════════════════════════════════════════════ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

#preloader::after {
  content: "";
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(8, 168, 176, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
}

/* ════════════════════════════════════════════
   KEYFRAMES
════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* ════════════════════════════════════════════
   TABLET  ≥ 640px
════════════════════════════════════════════ */
@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .proj-featured {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .proj-featured .proj-img {
    width: 52%;
    flex-shrink: 0;
    aspect-ratio: auto;
  }

  .proj-featured .proj-body {
    padding: 2rem;
  }

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

  .form-row {
    flex-direction: row;
  }

  .form-row .form-field {
    flex: 1;
  }
}

/* ════════════════════════════════════════════
   DESKTOP  ≥ 900px
════════════════════════════════════════════ */
@media (min-width: 900px) {
  .section-pad {
    padding: 8rem 0;
  }

  .container {
    padding: 0 2rem;
  }

  /* Header */
  .nav-toggle {
    display: none;
  }

  .navmenu {
    display: flex !important;
    position: static;
    width: auto;
    background: transparent;
    padding: 0;
    border: 0;
  }

  .navmenu ul {
    flex-direction: row;
    gap: 0.25rem;
  }

  .navmenu a {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    border: 0;
    border-radius: var(--radius-full);
    color: rgba(255, 255, 255, 0.65);
  }

  .navmenu a:hover,
  .navmenu a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
  }

  /* Hero */
  .hero-stage {
    padding: 7rem 4rem 5rem;
  }

  .hero-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }

  .hero-portrait img {
    height: min(88svh, 760px);
  }

  /* About */
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
  }

  .about-left {
    position: sticky;
    top: 6rem;
  }

  /* Skills */
  .skill-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
  }

  .skill-cat {
    width: 160px;
    padding-top: 0.35rem;
  }

  .skill-pills {
    flex: 1;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .proj-featured {
    grid-column: 1 / -1;
  }

  /* Certs */
  .certs-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Contact */
  .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
  }

  .contact-info {
    position: sticky;
    top: 6rem;
  }
}

/* ════════════════════════════════════════════
   LARGE DESKTOP  ≥ 1200px
════════════════════════════════════════════ */
@media (min-width: 1200px) {
  .hero-stage {
    padding: 7rem 6rem 5rem;
  }
}

/* ════════════════════════════════════════════
   ACCESSIBILITY
════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
