/* =========================================================
   RzkyRsy Portfolio — Design System
   ========================================================= */

:root {
  /* Colors */
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --text: #14181f;
  --muted: #5b6472;
  --muted-2: #8891a0;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #e8f0fe;
  --accent-2: #7c3aed;
  --border: #e4e9f1;
  --success: #16a34a;

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-full: 999px;

  /* Shadow */
  --shadow-sm: 0 2px 10px rgba(20, 24, 31, .05);
  --shadow-md: 0 10px 28px rgba(20, 24, 31, .08);
  --shadow-lg: 0 22px 55px rgba(20, 24, 31, .14);

  /* Layout */
  --header-h: 72px;
  --container: 1180px;
  --section-pad: clamp(64px, 9vw, 120px);

  /* Type */
  --font-body: 'Poppins', system-ui, sans-serif;
  --font-display: 'Fraunces', 'Poppins', serif;
}

/* =========================================================
   Reset
   ========================================================= */

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

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

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

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

section {
  padding: var(--section-pad) 6vw;
  position: relative;
}

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

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  z-index: 3000;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* =========================================================
   Scroll progress
   ========================================================= */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 3000;
  transition: width .1s linear;
}

/* =========================================================
   Header / Navbar
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 2000;
  background: transparent;
  transition: background .35s ease, box-shadow .35s ease, backdrop-filter .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: .2px;
  flex-shrink: 0;
}

.brand-mark {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
}

.brand-name .accent {
  color: var(--accent);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 6px;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--r-full);
  transition: color .25s ease, background .25s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-cta {
  display: none;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  align-items: center;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  padding: 10px 6vw 22px;
  gap: 4px;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease, visibility .25s;
  z-index: 1999;
}

.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-mobile .nav-link {
  padding: 13px 12px;
  font-size: 16px;
  border-radius: var(--r-sm);
  border-bottom: 1px solid var(--border);
}

.nav-mobile .nav-link:last-of-type {
  border-bottom: none;
}

.nav-mobile .btn {
  margin-top: 12px;
  width: 100%;
  text-align: center;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 15px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  min-height: 44px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .25);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, .32);
}

.btn-outline {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--border);
}

.btn-sm {
  padding: 9px 20px;
  font-size: 13.5px;
  min-height: 38px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .5;
  pointer-events: none;
}

/* =========================================================
   Section heads
   ========================================================= */

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .3px;
  margin-bottom: 10px;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto clamp(36px, 5vw, 56px);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.3px;
}

.section-head p.section-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15.5px;
}

/* =========================================================
   Reveal animation
   ========================================================= */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}

[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }

/* =========================================================
   Hero
   ========================================================= */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 30px);
  padding-bottom: 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-watermark {
  position: absolute;
  top: -8%;
  right: -2%;
  font-family: var(--font-display);
  font-size: min(60vw, 620px);
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  opacity: .05;
  user-select: none;
}

.hero-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.16), transparent 70%);
  top: -120px;
  left: -120px;
  filter: blur(10px);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 46px;
  width: 100%;
}

.hero-text {
  width: 100%;
  text-align: center;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(30px, 6.4vw, 54px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.5px;
  margin-bottom: 14px;
}

.hero-role {
  color: var(--muted);
  font-weight: 500;
  font-size: clamp(14px, 2.4vw, 17px);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

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

.hero-desc {
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 30px;
  font-size: clamp(14.5px, 2vw, 16px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 32px;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px;
}

.hero-meta strong {
  display: block;
  font-size: 13.5px;
  color: var(--text);
}

.hero-meta span {
  color: var(--muted-2);
  font-size: 12px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-photo-wrap {
  position: relative;
  width: clamp(190px, 42vw, 280px);
  height: clamp(190px, 42vw, 280px);
}

.hero-photo-wrap::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent), var(--accent-2), var(--accent));
  opacity: .18;
  animation: spin 14s linear infinite;
}

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

.hero-photo {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--surface);
  box-shadow: var(--shadow-lg);
}

.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 9px 14px;
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  font-weight: 600;
  animation: float 5s ease-in-out infinite;
}

.badge-role {
  top: 6%;
  left: -4%;
}

.badge-focus {
  bottom: 8%;
  right: -6%;
  animation-delay: 1.2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: var(--r-full);
  display: none;
}

.scroll-cue span {
  display: block;
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: var(--r-full);
  margin: 6px auto 0;
  animation: cue 1.8s ease infinite;
}

@keyframes cue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { opacity: 0; }
}

/* =========================================================
   About
   ========================================================= */

.about-grid {
  max-width: 980px;
  margin: 0 auto;
}

.about-lead {
  text-align: center;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 17px);
  max-width: 680px;
  margin: 0 auto clamp(36px, 5vw, 50px);
}

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

.info-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.info-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  font-size: 20px;
  margin-bottom: 14px;
}

.info-card h3 {
  font-size: 15.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.info-card p {
  color: var(--muted);
  font-size: 14px;
}

/* =========================================================
   Skills
   ========================================================= */

.skills-groups {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(22px, 4vw, 32px);
  box-shadow: var(--shadow-sm);
}

.skill-group h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 20px;
}

.skill-bars {
  display: grid;
  gap: 18px;
}

.skill-bar-row .skill-bar-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.skill-bar-top span:last-child {
  color: var(--muted-2);
  font-weight: 400;
  font-size: 13px;
}

.bar {
  width: 100%;
  height: 9px;
  background: var(--surface-2);
  border-radius: var(--r-full);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0%;
  transition: width 1.1s cubic-bezier(.2,.7,.3,1);
}

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 13.5px;
  font-weight: 500;
  transition: transform .25s ease, border-color .25s ease;
}

.tool-chip:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.tool-chip .dot-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* =========================================================
   Projects
   ========================================================= */

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 42px);
}

.filter-btn {
  padding: 9px 20px;
  border-radius: var(--r-full);
  font-size: 13.5px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all .25s ease;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  max-width: var(--container);
  margin: 0 auto;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .35s ease, box-shadow .35s ease;
  display: flex;
  flex-direction: column;
}

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

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

.project-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}

.project-media .slides {
  display: flex;
  height: 100%;
  transition: transform .45s cubic-bezier(.2,.7,.3,1);
}

.project-media .slides img {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  object-fit: cover;
  object-position: top;
  transition: transform .5s ease;
}

.project-card:hover .project-media .slides img {
  transform: scale(1.06);
}

.media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 18, 24, .45);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: opacity .25s ease, background .25s ease;
}

.project-media:hover .media-nav,
.media-nav:focus-visible {
  opacity: 1;
}

.media-nav:hover {
  background: rgba(15, 18, 24, .7);
}

.media-prev { left: 10px; }
.media-next { right: 10px; }

.media-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}

.media-dots .mdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  transition: background .25s ease, width .25s ease;
}

.media-dots .mdot.active {
  background: #fff;
  width: 16px;
  border-radius: var(--r-full);
}

.project-category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,.92);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--r-full);
  z-index: 2;
  letter-spacing: .2px;
}

/* Decorative browser mock (used when no real screenshot exists) */
.browser-mock {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #111827, #1e293b);
}

.browser-mock .mock-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,.06);
}

.browser-mock .mock-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
}

.browser-mock .mock-dot:nth-child(1) { background: #ef4444; }
.browser-mock .mock-dot:nth-child(2) { background: #f59e0b; }
.browser-mock .mock-dot:nth-child(3) { background: #22c55e; }

.browser-mock .mock-body {
  flex: 1;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.browser-mock .mock-line {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(99,102,241,.5), rgba(99,102,241,.15));
}

.browser-mock .mock-line.w60 { width: 60%; }
.browser-mock .mock-line.w40 { width: 40%; }
.browser-mock .mock-line.w80 { width: 80%; background: linear-gradient(90deg, rgba(139,92,246,.55), rgba(139,92,246,.15)); }
.browser-mock .mock-line.w30 { width: 30%; background: linear-gradient(90deg, rgba(34,197,94,.55), rgba(34,197,94,.15)); }

.browser-mock .mock-chip-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.browser-mock .mock-chip {
  padding: 5px 12px;
  font-size: 10.5px;
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-full);
}

.project-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.project-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.project-title-row h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}

.project-body p.project-desc {
  color: var(--muted);
  font-size: 14px;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 4px 0 6px;
}

.tech-badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: var(--r-full);
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.project-links {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  flex-wrap: wrap;
}

.project-links .btn {
  flex: 1;
  min-width: 120px;
}

.link-note {
  font-size: 12.5px;
  color: var(--muted-2);
  font-style: italic;
}

/* Coming soon card */
.project-card.coming-soon {
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1.5px dashed var(--border);
  box-shadow: none;
  background: var(--surface-2);
}

.coming-soon .project-media {
  aspect-ratio: auto;
  padding: 46px 24px 10px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coming-soon-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.coming-soon .project-body {
  align-items: center;
  text-align: center;
}

/* =========================================================
   Modal
   ========================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, .6);
  backdrop-filter: blur(4px);
  z-index: 4000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  padding: 0;
}

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

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }
}

.modal-box {
  background: var(--surface);
  width: 100%;
  max-width: 640px;
  max-height: 92svh;
  overflow-y: auto;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  transform: translateY(30px);
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
  position: relative;
}

@media (min-width: 640px) {
  .modal-box {
    border-radius: var(--r-lg);
  }
}

.modal-overlay.open .modal-box {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15,18,24,.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 5;
}

.modal-media {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface-2);
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.modal-content {
  padding: 26px clamp(20px, 4vw, 32px) 32px;
}

.modal-content .project-category-tag {
  position: static;
  display: inline-block;
  background: var(--accent-soft);
  margin-bottom: 12px;
}

.modal-content h3 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 12px;
}

.modal-section {
  margin-top: 16px;
}

.modal-section h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted-2);
  margin-bottom: 6px;
  font-weight: 700;
}

.modal-section p {
  color: var(--muted);
  font-size: 14.5px;
}

/* =========================================================
   Services ("What I Can Build")
   ========================================================= */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 26px 22px;
  transition: transform .3s ease, box-shadow .3s ease;
  text-align: center;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 22px;
}

.service-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.service-card p {
  color: var(--muted);
  font-size: 13.5px;
}

/* =========================================================
   Journey / Timeline
   ========================================================= */

.timeline {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--border));
}

.timeline-item {
  position: relative;
  padding-left: 56px;
  margin-bottom: 34px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 6px;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}

.timeline-item h3 {
  font-size: 16.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-item p {
  color: var(--muted);
  font-size: 14px;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.cert-card {
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  position: relative;
  display: block;
}

.cert-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.cert-card:hover img {
  transform: scale(1.08);
}

.cert-card::after {
  content: "🔍";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,18,24,0);
  color: #fff;
  opacity: 0;
  transition: opacity .25s ease, background .25s ease;
  font-size: 15px;
}

.cert-card:hover::after {
  opacity: 1;
  background: rgba(15,18,24,.35);
}

/* =========================================================
   Contact
   ========================================================= */

.contact-inner {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.6vw, 42px);
  font-weight: 600;
  letter-spacing: -.4px;
}

.contact-inner > p.section-sub {
  margin: 12px auto 40px;
  color: var(--muted);
  max-width: 520px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  text-align: left;
  margin-bottom: 34px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.contact-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon svg {
  width: 19px;
  height: 19px;
}

.contact-card .contact-label {
  font-size: 12px;
  color: var(--muted-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.contact-card .contact-value {
  font-size: 14.5px;
  font-weight: 500;
  word-break: break-word;
}

/* =========================================================
   Back to top
   ========================================================= */

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease, background .25s ease;
  z-index: 1500;
  font-size: 18px;
}

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

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

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: #10141d;
  color: #cbd2e0;
  padding: 46px 6vw 26px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-brand .brand-name {
  color: #fff;
  font-size: 20px;
}

.footer-role {
  font-size: 13px;
  color: #8891a0;
  margin-top: 2px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: #cbd2e0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s ease, transform .25s ease, color .25s ease;
}

.footer-social a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  width: 100%;
  padding-top: 20px;
  font-size: 12.5px;
  color: #6b7385;
  text-align: center;
}

/* =========================================================
   Responsive — Tablet ≥ 640px
   ========================================================= */

@media (min-width: 640px) {
  .info-cards {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .footer-social {
    order: 2;
  }
}

/* =========================================================
   Responsive — Desktop ≥ 900px
   ========================================================= */

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }

  .header-cta {
    display: inline-flex;
  }

  .hamburger,
  .nav-mobile {
    display: none;
  }

  .hero-inner {
    flex-direction: row;
    text-align: left;
    gap: 60px;
  }

  .hero-text {
    text-align: left;
    flex: 1.1;
  }

  .hero-role,
  .hero-actions {
    justify-content: flex-start;
  }

  .hero-desc {
    margin-left: 0;
  }

  .hero-visual {
    flex: 1;
  }

  .scroll-cue {
    display: block;
  }

  .about-lead {
    font-size: 18px;
  }

  .skill-group {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: start;
    gap: 30px;
  }

  .skill-group h3 {
    margin-bottom: 0;
    padding-top: 4px;
  }

  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(5, 1fr);
  }

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

  .cert-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1100px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================================================
   Small mobile refinements ( ≤ 380px )
   ========================================================= */

@media (max-width: 380px) {
  section {
    padding-left: 5vw;
    padding-right: 5vw;
  }

  .hero-actions .btn,
  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

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