:root {
  --bg: #f6f8fc;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --text: #0f172a;
  --muted: #596579;
  --line: #e9e2da;
  --primary: #f26a21;
  --primary-strong: #d95614;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-soft: 0 10px 30px rgba(14, 38, 77, 0.08);
  --container-gap: clamp(1rem, 2.2vw, 1.6rem);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: radial-gradient(1200px 700px at 10% -5%, #e6ecff 0%, transparent 60%),
    radial-gradient(1000px 700px at 95% 15%, #e8f5ff 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body.dark-mode {
  --bg: #0b1320;
  --surface: rgba(16, 24, 39, 0.74);
  --surface-solid: #111b2d;
  --text: #ebf1fb;
  --muted: #a4b6cf;
  --line: #2a3b55;
  --primary: #6ea7ff;
  --primary-strong: #4e8ef2;
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.38);
  background: radial-gradient(1200px 700px at 10% -5%, #17345e 0%, transparent 60%),
    radial-gradient(1000px 700px at 95% 15%, #10334e 0%, transparent 55%),
    var(--bg);
}

.bg-glow {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.2;
}

.bg-glow-1 {
  top: -160px;
  left: -120px;
  background: #8ac5ff;
}

.bg-glow-2 {
  right: -120px;
  bottom: -180px;
  background: #97a8ff;
}

.shell {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(246, 248, 252, 0.74);
  border-bottom: 1px solid rgba(220, 227, 239, 0.72);
}

body.dark-mode .site-header {
  background: rgba(11, 19, 32, 0.72);
  border-bottom-color: rgba(42, 59, 85, 0.82);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: "Dancing Script", "Segoe Script", cursive;
  letter-spacing: 0.01em;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 1.45rem;
  line-height: 1;
}

.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

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

.nav-cta {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-solid);
}

.theme-toggle {
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--text);
  border-radius: 999px;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  transition: 160ms ease;
}

.theme-toggle:hover {
  border-color: #d8b49d;
  transform: translateY(-1px);
}

body.dark-mode .theme-toggle:hover {
  border-color: #48658f;
}

.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.theme-icon-sun {
  display: none;
}

body.dark-mode .theme-icon-moon {
  display: none;
}

body.dark-mode .theme-icon-sun {
  display: inline-flex;
}

main {
  padding-top: 3.4rem;
}

section {
  margin-bottom: 5rem;
}

section[id] {
  scroll-margin-top: 96px;
}

.hero {
  padding: 4rem 0 2rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 340px);
  align-items: center;
  gap: clamp(1.25rem, 3vw, 3.2rem);
}

.hero-content {
  text-align: left;
}

.eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 5vw, 4.3rem);
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.fx-headline {
  position: relative;
}

.fx-headline-clip {
  position: relative;
  display: inline-block;
  max-width: 100%;
  clip-path: inset(0 100% 0 0);
  filter: blur(10px);
  transform: translateY(8px);
}

.fx-headline-gradient {
  position: relative;
  display: inline-block;
  opacity: 1;
}

.fx-headline-gradient::before {
  content: attr(data-text);
  white-space: pre-wrap;
  background-image: linear-gradient(90deg, #f4a06b 0%, #f26a21 52%, #e7b589 100%);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  display: inline-block;
}

.fx-headline-solid {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.fx-headline-shine {
  pointer-events: none;
  position: absolute;
  inset-block: 0;
  left: -33%;
  width: 33%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.82), transparent);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateX(-120%);
}

.fx-headline.fx-active .fx-headline-clip {
  animation: headlineReveal 1.25s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.fx-headline.fx-active .fx-headline-gradient {
  animation: headlineGradientToSolid 1.25s ease forwards;
}

.fx-headline.fx-active .fx-headline-solid {
  animation: headlineSolidIn 1.25s ease forwards;
}

.fx-headline.fx-active .fx-headline-shine {
  animation: headlineShineSweep 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.06s forwards;
}

@keyframes headlineReveal {
  0% {
    clip-path: inset(0 100% 0 0);
    filter: blur(10px);
    transform: translateY(8px);
  }

  82% {
    clip-path: inset(0 -2% 0 0);
    filter: blur(0);
    transform: translateY(0);
  }

  100% {
    clip-path: inset(0 0 0 0);
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes headlineGradientToSolid {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes headlineSolidIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes headlineShineSweep {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }

  20% {
    opacity: 0.85;
  }

  100% {
    transform: translateX(260%);
    opacity: 0;
  }
}

.hero-copy {
  max-width: 58ch;
  margin: 1.35rem 0 0;
  font-size: clamp(1rem, 2.1vw, 1.25rem);
  color: var(--muted);
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-start;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-photo-wrap {
  margin: 0;
  justify-self: end;
  width: min(100%, 340px);
}

.hero-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 48px rgba(18, 37, 72, 0.16);
  background: #e6edff;
}

.btn {
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  transition: 160ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.btn-primary:hover {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  border-color: #dab8a3;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--container-gap);
}

.feature-card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.feature-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #e7d8cb;
  margin-bottom: 0.9rem;
}

.feature-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.feature-card h3 {
  margin-top: 0.45rem;
  font-size: 1.25rem;
}

.feature-card p:last-child {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.section-head {
  margin-bottom: 1.25rem;
}

.section-head h2 {
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-size: clamp(1.7rem, 3.3vw, 2.75rem);
}

.work {
  margin-bottom: clamp(4.5rem, 6.2vw, 6rem);
}

.project-carousel {
  --slides-per-view: 3;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) + 4px);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  padding: 1rem;
}

body.dark-mode .project-carousel {
  background: linear-gradient(180deg, #121f33 0%, #0f1a2c 100%);
}

.carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.carousel-counter {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.carousel-controls {
  display: inline-flex;
  gap: 0.55rem;
}

.carousel-btn {
  border: 1px solid var(--line);
  background: var(--surface-solid);
  color: var(--text);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  transition: 140ms ease;
}

.carousel-btn:hover {
  border-color: #dcb89f;
  transform: translateY(-1px);
}

.carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.carousel-track {
  display: flex;
  gap: var(--container-gap);
  transition: none;
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 calc((100% - (var(--container-gap) * (var(--slides-per-view) - 1))) / var(--slides-per-view));
}

.work-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-solid);
}

.work-visual {
  min-height: 210px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: #eaf1ff;
}

.work-visual-01 { background-image: url("assets/project-01.svg"); }
.work-visual-02 { background-image: url("assets/project-02.svg"); }
.work-visual-03 { background-image: url("assets/project-03.svg"); }
.work-visual-04 { background-image: url("assets/project-04.svg"); }
.work-visual-05 { background-image: url("assets/project-05.svg"); }
.work-visual-06 { background-image: url("assets/project-06.svg"); }
.work-visual-07 { background-image: url("assets/project-07.svg"); }
.work-visual-08 { background-image: url("assets/project-08.svg"); }
.work-visual-09 { background-image: url("assets/project-09.svg"); }
.work-visual-10 { background-image: url("assets/project-10.svg"); }
.work-visual-11 { background-image: url("assets/project-11.svg"); }
.work-visual-12 { background-image: url("assets/project-12.svg"); }

.work-meta {
  padding: 1.05rem 1.1rem 1.2rem;
}

.work-meta h3 {
  font-size: 1.15rem;
}

.work-meta p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.carousel-dots {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.22);
  padding: 0;
  transition: width 220ms ease, background-color 220ms ease;
}

.carousel-dot.active {
  width: 22px;
  background: var(--primary);
}

body.dark-mode .carousel-dot {
  background: rgba(255, 255, 255, 0.42);
}

body.dark-mode .carousel-dot.active {
  background: #ffffff;
}

.experience {
  margin-bottom: clamp(5rem, 7vw, 6.5rem);
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--container-gap);
}

.experience-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  padding: 1.2rem;
}

.experience-range {
  margin: 0;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.experience-card h3 {
  margin-top: 0.55rem;
  font-size: 1.1rem;
}

.experience-card p:last-child {
  margin: 0.7rem 0 0;
  color: var(--muted);
}

.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--container-gap);
  margin-top: clamp(0.8rem, 2vw, 1.6rem);
  margin-bottom: clamp(6rem, 8vw, 7.5rem);
}

.about-copy,
.about-stats {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  padding: 1.3rem;
}

.about-copy h2 {
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
}

.about-copy p:last-child {
  color: var(--muted);
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  gap: 0.8rem;
}

.stat {
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.stat-value {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.stat-label {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.skills {
  margin-bottom: clamp(5rem, 7vw, 6.5rem);
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--container-gap);
}

.skill-group {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  padding: 1.15rem;
}

.skill-group h3 {
  font-size: 1.08rem;
  margin-bottom: 0.85rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.skill-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.8rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.62rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.skill-item:hover {
  transform: translateY(-2px);
  border-color: #dfbda5;
  box-shadow: 0 10px 20px rgba(145, 65, 20, 0.08);
}

.skill-item img {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}

.skill-item p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

body.dark-mode .skill-item {
  background: rgba(17, 27, 45, 0.7);
}

body.dark-mode .skill-item:hover {
  border-color: #3f5a80;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--container-gap);
}

.service-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  background: var(--surface-solid);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.service-card h3 {
  font-size: 1.1rem;
  transition: color 180ms ease;
}

.service-card p {
  color: var(--muted);
  margin-bottom: 0;
  transition: color 180ms ease;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-6px);
  border-color: #dfbda5;
  box-shadow: 0 14px 28px rgba(145, 65, 20, 0.09);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.service-card:hover h3,
.service-card:focus-within h3 {
  color: var(--primary);
}

body.dark-mode .service-card:hover,
body.dark-mode .service-card:focus-within {
  border-color: #3f5a80;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
  background: linear-gradient(180deg, #16243a 0%, #101c2f 100%);
}

.contact {
  margin-top: clamp(1rem, 2.4vw, 2rem);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) + 6px);
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  padding: 3rem 1.3rem;
}

body.dark-mode .contact {
  background: linear-gradient(180deg, #142238 0%, #0f1a2d 100%);
}

.contact h2 {
  font-family: "Outfit", "Segoe UI", sans-serif;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  max-width: 820px;
  margin: 0 auto;
}

.contact p {
  max-width: 680px;
  margin: 0.9rem auto 1.4rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 0.8rem;
  padding: 1.2rem 0 2rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 550ms ease, transform 550ms ease;
}

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

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

  .fx-headline-clip {
    clip-path: inset(0 0 0 0);
    filter: none;
    transform: none;
  }

  .fx-headline-gradient {
    opacity: 0;
  }

  .fx-headline-solid {
    opacity: 1;
    position: static;
  }

  .fx-headline-shine {
    display: none;
  }
}

@media (max-width: 980px) {
  .project-carousel {
    --slides-per-view: 2;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-content {
    text-align: center;
  }

  h1 {
    max-width: 100%;
  }

  .hero-copy {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-photo-wrap {
    justify-self: center;
    max-width: 320px;
  }

  .experience-grid,
  .skill-groups,
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 760px) {
  .project-carousel {
    --slides-per-view: 1;
  }

  section {
    margin-bottom: 4rem;
  }

  .work,
  .experience,
  .about {
    margin-bottom: 5rem;
  }

  .about,
  .contact {
    margin-top: 0.9rem;
  }

  .menu-btn {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    right: 4vw;
    left: 4vw;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.8rem;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    box-shadow: var(--shadow-soft);
  }

  body.dark-mode .nav-links {
    background: rgba(17, 27, 45, 0.96);
  }

  .theme-toggle {
    margin-left: 0;
    align-self: flex-start;
  }

  .nav-links.open {
    display: flex;
  }

  .experience-grid,
  .skill-groups,
  .service-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-photo-wrap {
    max-width: 290px;
  }
}
