:root {
  color-scheme: light;
  --bg: #f4f1ec;
  --surface: #ffffff;
  --text: #1b1f2a;
  --muted: #556070;
  --accent: #1f6f8b;
  --accent-strong: #15556b;
  --accent-soft: #e6f0f4;
  --border: #e2e0dc;
  --shadow: 0 12px 30px rgba(27, 31, 42, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 72px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #ffffff 0%, #f7f3ee 45%, #f2efe9 100%);
  line-height: 1.6;
}

body.home-dark {
  background: #0b0f15;
  color: #f2f4f7;
  font-family: "Inter", "Segoe UI", sans-serif;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(31, 111, 139, 0.35);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--accent);
  color: #ffffff;
  border-radius: 999px;
  z-index: 10;
}

body.home-dark .skip-link {
  background: #6cc4d9;
  color: #0b1117;
}

.skip-link:focus {
  left: var(--space-md);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.site-header {
  position: sticky;
  top: 0;
  background: rgba(244, 241, 236, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 224, 220, 0.7);
  z-index: 5;
}

body.home-dark .site-header {
  background: rgba(11, 15, 21, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.brand span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}

body.home-dark .brand span {
  color: rgba(242, 244, 247, 0.65);
}

.nav-links {
  display: flex;
  gap: var(--space-md);
  font-size: 0.95rem;
}

.nav-links a {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-links a.is-active,
.nav-links a:hover {
  background: var(--accent-soft);
  border-color: rgba(31, 111, 139, 0.2);
  color: var(--accent-strong);
}

body.home-dark .nav-links a {
  color: rgba(242, 244, 247, 0.82);
}

body.home-dark .nav-links a.is-active,
body.home-dark .nav-links a:hover {
  background: rgba(108, 196, 217, 0.18);
  border-color: rgba(108, 196, 217, 0.35);
  color: #f2f4f7;
}

.hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  position: relative;
  overflow: hidden;
}

.hero.hero-dark {
  --hero-bg: #0f141c;
  --hero-surface: #151b24;
  --hero-text: #f2f4f7;
  --hero-muted: #b2bac7;
  --hero-accent: #6cc4d9;
  --hero-border: rgba(255, 255, 255, 0.08);
  --hero-shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
  background: var(--hero-bg);
  color: var(--hero-text);
  font-family: "Inter", "Segoe UI", sans-serif;
}

.hero.hero-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(108, 196, 217, 0.18), transparent 55%),
    radial-gradient(circle at 80% 15%, rgba(108, 196, 217, 0.12), transparent 50%);
  pointer-events: none;
  opacity: 0.9;
}

.hero.hero-dark .container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-xl);
  align-items: center;
}

.hero-copy {
  grid-column: span 7;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 var(--space-md);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--hero-muted);
  margin: 0 auto var(--space-lg);
  max-width: 560px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.hero-proof-item {
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(226, 224, 220, 0.9);
  padding: var(--space-sm) var(--space-md);
  display: grid;
  gap: 4px;
  box-shadow: 0 10px 18px rgba(27, 31, 42, 0.06);
}

.hero-proof-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.hero-proof-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  justify-content: center;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(31, 111, 139, 0.2);
}

.button-primary:hover {
  background: var(--accent-strong);
}

.button-secondary {
  border-color: rgba(27, 31, 42, 0.2);
  color: var(--text);
}

.button-secondary:hover {
  border-color: rgba(31, 111, 139, 0.4);
  color: var(--accent-strong);
}

.hero-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(10, 12, 16, 0.28));
  background-color: rgba(21, 27, 36, 0.72);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  max-width: 760px;
  width: 100%;
  animation: heroCardIn 0.9s ease-in both;
}

.hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  object-fit: cover;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.hero-meta {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-sm);
  font-size: 0.95rem;
  color: var(--muted);
}

.hero.hero-dark .pill {
  background: rgba(108, 196, 217, 0.18);
  color: var(--hero-accent);
}

.hero.hero-dark .button-primary {
  background: var(--hero-accent);
  color: #0b1117;
  box-shadow: 0 10px 24px rgba(108, 196, 217, 0.3);
}

.hero.hero-dark .button-primary:hover {
  background: #7bd0e2;
}

.hero.hero-dark .button-secondary {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--hero-text);
}

.hero.hero-dark .button-secondary:hover {
  border-color: rgba(108, 196, 217, 0.5);
  color: var(--hero-accent);
}

.section {
  padding: var(--space-xl) 0;
}

.section-title {
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

body.home-dark .section {
  background: #0b0f15;
}

body.home-dark .section-title {
  font-family: "Playfair Display", "Times New Roman", serif;
  color: #f2f4f7;
}

body.home-dark .section-subtitle {
  color: rgba(242, 244, 247, 0.7);
}

body.home-dark .list {
  color: rgba(242, 244, 247, 0.7);
}

.section-subtitle {
  max-width: 680px;
  color: var(--muted);
  margin-bottom: var(--space-lg);
}

.projects-intro > .container > .section-subtitle {
  margin-bottom: var(--space-md);
}

.section-meta {
  margin-bottom: var(--space-lg);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  border: 1px solid rgba(226, 224, 220, 0.8);
  box-shadow: 0 12px 24px rgba(27, 31, 42, 0.08);
}

.case-studies .card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-footer {
  margin-top: auto;
  padding-top: var(--space-sm);
}

body.home-dark .card {
  background: #151b24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

body.home-dark .card p {
  color: rgba(242, 244, 247, 0.72);
}

.card h3 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
  font-size: 1.2rem;
}

.card p {
  margin: 0 0 var(--space-sm);
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 600;
}

body.home-dark .pill {
  background: rgba(108, 196, 217, 0.18);
  color: #9fe1ef;
}

body.home-dark .button-primary {
  background: #6cc4d9;
  color: #0b1117;
  box-shadow: 0 10px 24px rgba(108, 196, 217, 0.3);
}

body.home-dark .button-primary:hover {
  background: #7bd0e2;
}

body.home-dark .button-secondary {
  border-color: rgba(255, 255, 255, 0.2);
  color: #f2f4f7;
}

body.home-dark .button-secondary:hover {
  border-color: rgba(108, 196, 217, 0.5);
  color: #9fe1ef;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-xl);
  align-items: center;
}

.two-column .text {
  grid-column: span 7;
  max-width: 70ch;
  line-height: 1.75;
}

.two-column .media {
  grid-column: span 5;
  align-self: start;
  display: flex;
  justify-content: center;
}

.media img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  max-width: 360px;
  width: 100%;
}

.about-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(10, 12, 16, 0.28));
  background-color: rgba(21, 27, 36, 0.72);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: var(--space-lg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: var(--space-md);
  max-width: 360px;
  width: 100%;
  animation: aboutFadeIn 0.8s ease-in both;
}

.about-card-image {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  object-fit: cover;
}

.about-card-body {
  display: grid;
  gap: 6px;
}

.about-card-title {
  margin: 0;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: 1.4rem;
  color: #f2f4f7;
}

.about-card-role {
  margin: 0;
  color: rgba(242, 244, 247, 0.8);
  font-weight: 600;
}

.about-card-detail {
  margin: 0;
  color: rgba(242, 244, 247, 0.65);
  font-size: 0.95rem;
}

.list {
  padding-left: 1.1rem;
  margin: 0 0 var(--space-md);
  color: var(--muted);
}

.list li {
  margin-bottom: var(--space-xs);
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-sm);
}

.link-list a {
  display: block;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(226, 224, 220, 0.9);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  transition: all 0.2s ease;
}

.projects-intro .section-subtitle,
.case-studies .section-subtitle {
  margin-bottom: var(--space-md);
}

.projects-intro .section-meta {
  margin-bottom: var(--space-md);
}

body.home-dark .link-list a {
  background: #151b24;
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(242, 244, 247, 0.88);
}

.link-list a:hover {
  border-color: rgba(31, 111, 139, 0.4);
  color: var(--accent-strong);
  box-shadow: 0 10px 18px rgba(27, 31, 42, 0.08);
}

body.home-dark .link-list a:hover {
  border-color: rgba(108, 196, 217, 0.5);
  color: #f2f4f7;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.4);
}

body.home-dark .form {
  background: #151b24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

body.home-dark label {
  color: rgba(242, 244, 247, 0.8);
}

body.home-dark input,
body.home-dark textarea {
  background: #0f141c;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f2f4f7;
}

body.home-dark input::placeholder,
body.home-dark textarea::placeholder {
  color: rgba(242, 244, 247, 0.5);
}

body.home-dark .note {
  color: rgba(242, 244, 247, 0.6);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(226, 224, 220, 0.7);
  padding: var(--space-lg) 0;
  background: rgba(255, 255, 255, 0.7);
}

body.home-dark .site-footer {
  background: rgba(11, 15, 21, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

body.home-dark .footer-grid {
  color: rgba(242, 244, 247, 0.6);
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 224, 220, 0.8);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.form-message {
  margin-top: var(--space-md);
}

.form-actions {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.form-note {
  margin-top: var(--space-md);
}

label {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(27, 31, 42, 0.2);
  font-family: inherit;
  font-size: 1rem;
}

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

.note {
  color: var(--muted);
  font-size: 0.9rem;
}

.fade-up {
  animation: fadeUp 0.8s ease both;
}

.fade-up.delay-1 {
  animation-delay: 0.15s;
}

.fade-up.delay-2 {
  animation-delay: 0.3s;
}

.fade-up.delay-3 {
  animation-delay: 0.45s;
}

.fade-up.delay-4 {
  animation-delay: 0.6s;
}

.fade-up.delay-5 {
  animation-delay: 0.75s;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

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



body.home-dark .fade-up {
  animation: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes aboutFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroCardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@media (prefers-reduced-motion: reduce) {
  .fade-up {
    animation: none;
  }
  .hero-card,
  .about-card {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    scroll-behavior: auto !important;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

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

  .hero-copy,
  .hero-card,
  .two-column .text,
  .two-column .media {
    grid-column: auto;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

}

@media (max-width: 900px) {
  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-md);
    width: 100%;
    justify-items: stretch;
  }

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

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

@media (max-width: 720px) {
  .container {
    padding: 0 var(--space-md);
  }

  .nav-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-card {
    padding: var(--space-lg);
  }


  .button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }
}
