/* =========================================================
   Alvin — Portfolio (pofology-inspired)
   Vanilla CSS, no frameworks, no build step
   ========================================================= */

:root {
  --font: "Rubik", system-ui, -apple-system, sans-serif;

  --bg: #f3f4f6;
  --bg-header: rgba(255, 255, 255, 0.85);
  --card: #ffffff;
  --text: #4b5563;
  --text-soft: #6b7280;
  --heading: #111827;
  --border: #e5e7eb;

  --primary: #ff4c60;
  --primary-dark: #e6334a;
  --indigo: #6366f1;
  --yellow: #facc15;
  --pink: #ec4899;
  --track: #e5e7eb;

  --shadow: 0 8px 24px rgba(17, 24, 39, 0.06), 0 2px 6px rgba(17, 24, 39, 0.04);
  --shadow-lg: 0 16px 40px rgba(17, 24, 39, 0.1);
  --radius: 16px;
  --header-h: 76px;
}

[data-theme="dark"] {
  --bg: #111827;
  --bg-header: rgba(17, 24, 39, 0.85);
  --card: #1f2937;
  --text: #9ca3af;
  --text-soft: #9ca3af;
  --heading: #f3f4f6;
  --border: #374151;
  --track: #374151;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  color: var(--heading);
  line-height: 1.25;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

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

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

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

.container-narrow {
  width: min(820px, 92%);
}

/* ---------- Buttons ---------- */
.btn-pill {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 2.1rem;
  border: none;
  border-radius: 9999px;
  box-shadow: 0 8px 20px rgba(255, 76, 96, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-pill:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(255, 76, 96, 0.45);
}

.btn-pill:active {
  transform: translateY(0);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease, background 0.35s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.5px;
}

.logo .dot,
.hero-name .dot {
  color: var(--primary);
}

.nav ul {
  display: flex;
  gap: 2.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  position: relative;
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--text);
  padding: 0.3rem 0;
  transition: color 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

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

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--heading);
  transition: background 0.25s ease, transform 0.25s ease;
}

.icon-btn:hover {
  background: var(--border);
  transform: rotate(15deg);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

#theme-toggle .ic-moon { display: none; }
#theme-toggle .ic-sun { display: block; }
[data-theme="dark"] #theme-toggle .ic-moon { display: block; }
[data-theme="dark"] #theme-toggle .ic-sun { display: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--heading);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.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: calc(var(--header-h) + 3rem) 0 7rem;
}

.shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.shape {
  position: absolute;
  display: block;
  will-change: transform;
}

.shape svg {
  width: 100%;
  height: 100%;
}

.shape-bell, .shape-code, .shape-star, .shape-triangle, .shape-cloud {
  width: 26px;
  height: 26px;
}

.shape-star { width: 30px; height: 30px; }

.shape-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color, #d8b4fe);
  opacity: 0.7;
}

.shape-ring {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 4px solid var(--color, #a5b4fc);
  opacity: 0.75;
}

.shape-blob {
  width: 52px;
  height: 52px;
  background: var(--color, #f9a8d4);
  border-radius: 42% 58% 60% 40% / 50% 45% 55% 50%;
  opacity: 0.7;
}

.shape-bar {
  width: 6px;
  height: 30px;
  border-radius: 3px;
  background: var(--color, #6ee7b7);
  opacity: 0.8;
}

/* Hero content */
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-wrap {
  position: relative;
  width: 170px;
  height: 170px;
  margin-bottom: 1.6rem;
}

.avatar {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
}

.avatar svg {
  width: 100%;
  height: 100%;
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--primary),
    var(--yellow),
    #22c55e,
    #3b82f6,
    var(--indigo),
    var(--pink),
    var(--primary)
  );
  animation: ring 6s linear infinite, ringGlow 3s ease-in-out infinite;
}

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

@keyframes ringGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 76, 96, 0.35); }
  50% { box-shadow: 0 0 0 12px rgba(255, 76, 96, 0.08); }
}

.hero-name {
  font-size: clamp(2.2rem, 5.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
}

.hero-typed {
  margin: 0.6rem 0 1.6rem;
  font-size: 1.15rem;
  color: var(--text-soft);
}

.typed-text {
  color: var(--primary);
  font-weight: 600;
}

.caret {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  margin-left: 4px;
  vertical-align: text-bottom;
  background: var(--primary);
  border-radius: 2px;
  animation: typedjsBlink 0.9s step-end infinite;
}

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

.hero-socials {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.hero-socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--text-soft);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.hero-socials a:hover {
  color: #fff;
  background: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(255, 76, 96, 0.35);
}

.hero-socials svg {
  width: 19px;
  height: 19px;
}

/* Scroll down indicator */
.scroll-down {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-soft);
  letter-spacing: 0.5px;
  z-index: 2;
  transition: color 0.25s ease;
}

.scroll-down:hover {
  color: var(--primary);
}

.mouse {
  position: relative;
  width: 24px;
  height: 38px;
  border: 2px solid currentColor;
  border-radius: 12px;
}

.wheel {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: currentColor;
  animation: scroll 1.8s ease-in-out infinite;
}

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

/* ---------- Sections ---------- */
.section {
  padding: 6.5rem 0;
}

.section-title {
  position: relative;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 3.2rem;
}

.section-title span {
  color: var(--primary);
}

/* dotted decoration cluster to the left of the heading */
.section-title::before {
  content: "";
  position: absolute;
  left: -52px;
  top: 2px;
  width: 38px;
  height: 38px;
  background-image: radial-gradient(circle, var(--text) 1.7px, transparent 1.8px);
  background-size: 12px 12px;
  opacity: 0.3;
}

/* ---------- Cards (shared) ---------- */
.work-card, .post-card, .exp-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.work-card:hover, .post-card:hover, .exp-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  align-items: center;
  margin-bottom: 4rem;
}

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

.about-text .btn-pill {
  margin-top: 0.6rem;
}

.skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem 2rem;
}

.skill-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.skill-name {
  font-weight: 600;
  color: var(--heading);
  font-size: 0.95rem;
}

.skill-val {
  font-size: 0.85rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.skill-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}

.skill-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text-soft);
  flex-shrink: 0;
}

.stat-icon svg {
  width: 34px;
  height: 34px;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--heading);
  font-variant-numeric: tabular-nums;
}

.stat p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.35;
}

/* ---------- Experiences & Educations ---------- */
.journey-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.journey-col {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.exp-card {
  padding: 1.7rem 1.8rem;
}

.exp-date {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.7rem;
  font-size: 0.88rem;
  color: var(--primary);
  font-weight: 500;
}

.exp-date svg {
  width: 17px;
  height: 17px;
}

.exp-title {
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.exp-org {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin-bottom: 0.7rem;
}

.exp-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.service-card {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  border-radius: var(--radius);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.015);
}

.service-deco {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  top: -90px;
  right: -70px;
  transition: transform 0.5s ease;
}

.service-card:hover .service-deco {
  transform: scale(1.35);
}

.service-indigo {
  background: var(--indigo);
  color: #fff;
}

.service-yellow {
  background: var(--yellow);
  color: #3f2d00;
}

.service-yellow h3 {
  color: #1f2937;
}

.service-yellow .service-deco {
  background: rgba(0, 0, 0, 0.06);
}

.service-pink {
  background: var(--pink);
  color: #fff;
}

.service-card h3 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  position: relative;
}

.service-card p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.92;
  max-width: 28ch;
  position: relative;
}

.services-cta {
  text-align: center;
  color: var(--text-soft);
  margin: 0;
}

.services-cta a {
  color: var(--primary);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease;
}

.services-cta a:hover {
  border-color: var(--primary);
}

/* ---------- Works ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.work-card {
  overflow: hidden;
  cursor: pointer;
}

.work-cover {
  display: grid;
  place-items: center;
  height: 200px;
  background: linear-gradient(135deg, var(--g1, #a5b4fc), var(--g2, #818cf8));
  font-size: 3.4rem;
  transition: transform 0.4s ease;
}

.work-card:hover .work-cover span {
  transform: scale(1.18) rotate(-6deg);
}

.work-cover span {
  transition: transform 0.4s ease;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}

.work-body {
  padding: 1.3rem 1.4rem 1.5rem;
}

.work-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.work-body p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.works-more {
  text-align: center;
}

/* ---------- Reviews ---------- */
.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.carousel-viewport {
  overflow: hidden;
  flex: 1;
}

.carousel-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.review {
  flex: 0 0 100%;
  margin: 0;
  text-align: center;
  padding: 0 0.5rem;
}

.review blockquote {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.4rem 2.6rem;
  margin: 0 0 1.3rem;
  font-size: 1.02rem;
  color: var(--text);
  position: relative;
  border-left: 4px solid var(--primary);
}

.review figcaption b {
  color: var(--heading);
  font-size: 1rem;
  display: block;
}

.review figcaption span {
  color: var(--text-soft);
  font-size: 0.85rem;
}

.carousel-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--card);
  color: var(--heading);
  box-shadow: var(--shadow);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.carousel-arrow:hover {
  background: var(--primary);
  color: #fff;
  transform: scale(1.08);
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.8rem;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--border);
  transition: width 0.3s ease, background 0.3s ease;
}

.carousel-dots button.active {
  width: 26px;
  background: var(--primary);
}

/* ---------- Posts ---------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.post-card {
  overflow: hidden;
}

.post-thumb {
  display: grid;
  place-items: center;
  height: 180px;
  background: linear-gradient(135deg, var(--g1, #a5b4fc), var(--g2, #818cf8));
  font-size: 3rem;
}

.post-thumb span {
  transition: transform 0.4s ease;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.18));
}

.post-card:hover .post-thumb span {
  transform: scale(1.15) rotate(5deg);
}

.post-body {
  padding: 1.3rem 1.4rem 1.5rem;
}

.post-body h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.post-date {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

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

.contact-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-text p {
  color: var(--text-soft);
  margin: 0;
}

.contact-text a {
  color: var(--primary);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease;
}

.contact-text a:hover {
  border-color: var(--primary);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--heading);
  background: var(--card);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
  box-shadow: var(--shadow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.35s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-soft);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 76, 96, 0.15);
}

.contact-form .btn-pill {
  align-self: flex-start;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2.2rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.site-footer p {
  margin: 0;
}

/* ---------- Keyframes: floating shapes ---------- */
@keyframes move {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-26px); }
}

@keyframes move-rotate {
  0% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(10deg) translateY(-22px); }
  100% { transform: rotate(-8deg) translateY(0); }
}

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

@keyframes pulseShape {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.25); opacity: 0.4; }
}

.anim-move { animation: move var(--dur, 12s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
.anim-move-rotate { animation: move-rotate var(--dur, 14s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
.anim-spin { animation: spinShape var(--dur, 24s) linear infinite; animation-delay: var(--delay, 0s); }
.anim-pulse { animation: pulseShape var(--dur, 8s) ease-in-out infinite; animation-delay: var(--delay, 0s); }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--rd, 0s);
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
  }

  .journey-grid,
  .services-grid,
  .works-grid,
  .posts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .section-title::before {
    left: 0;
    top: -26px;
  }

  .section-title {
    margin-top: 1rem;
    margin-bottom: 2.4rem;
  }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-header);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.4s ease, visibility 0.4s ease, padding 0.4s ease;
  }

  .nav.open {
    max-height: 320px;
    visibility: visible;
  }

  .nav ul {
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
  }

  .nav a {
    display: block;
    padding: 0.9rem 2rem;
  }

  .nav a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .carousel {
    flex-direction: column;
  }

  .carousel-arrow {
    position: absolute;
    bottom: -74px;
    top: auto;
    z-index: 2;
  }

  .carousel-arrow.prev { left: calc(50% - 110px); }
  .carousel-arrow.next { right: calc(50% - 110px); }

  .carousel-dots {
    margin-top: 1.4rem;
  }

  #reviews .section {
    padding-bottom: 5rem;
  }
}

@media (max-width: 600px) {
  .journey-grid,
  .services-grid,
  .works-grid,
  .posts-grid,
  .skills,
  .form-row {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 4.5rem 0;
  }

  .work-cover {
    height: 160px;
  }

  .shape { transform: scale(0.8); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .skill-fill {
    transition: none;
  }
}
