:root {
  --white: #f5f4f0;
  --black: #111110;
  --gray-100: #ebebea;
  --gray-200: #d8d8d6;
  --gray-400: #a0a09e;
  --gray-600: #6b6b69;
  --gray-800: #2e2e2c;
  --ff-sans: 'DM Sans', sans-serif;
  --ff-mono: 'DM Mono', monospace;
}

[data-theme="dark"] {
  --white: #111110;
  --black: #f0efeb;
  --gray-100: #1e1e1c;
  --gray-200: #2e2e2c;
  --gray-400: #6b6b69;
  --gray-600: #a0a09e;
  --gray-800: #d8d8d6;
}

[data-theme="dark"] nav {
  background: rgba(17, 17, 16, 0.92);
}

[data-theme="dark"] .carousel-slide:hover .project-img-wrap img {
  filter: grayscale(0%);
}

[data-theme="dark"] .carousel-btn {
  background: #111;
  border-color: #2a2a2a;
  color: #aaa;
}

[data-theme="dark"] .carousel-btn:hover {
  background: var(--white);
  color: var(--black);
}

[data-theme="dark"] .carousel-slide {
  border-color: #2a2a2a;
}

[data-theme="dark"] .cert-card.no-link:hover,
[data-theme="dark"] .cert-card:hover {
  background: #1e1e1c;
}

[data-theme="dark"] .contact-card:hover {
  background: var(--black);
}

[data-theme="dark"] .contact-card:hover .cc-name {
  color: var(--white);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  background: #1e1e1c;
  color: var(--black);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--ff-sans);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-200);
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  height: 60px;
  background: rgba(245, 244, 240, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-100);
}

.nav-logo {
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-cv {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  background: var(--black);
  color: var(--white) !important;
  padding: 0.4rem 0.9rem;
}

.nav-cv:hover {
  opacity: 0.75;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0 3rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
  max-width: 860px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.1s ease forwards;
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--black);
}

.hero-eyebrow-text {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--gray-600);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-name {
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.1rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s ease forwards;
}

.hero-name strong {
  font-weight: 600;
}

.hero-role {
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--gray-400);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.3s ease forwards;
}

.hero-bio {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray-600);
  max-width: 500px;
  margin-bottom: 3rem;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.7s 0.4s ease forwards;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.7s 0.5s ease forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-sans);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.7rem 1.4rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-solid {
  background: var(--black);
  color: var(--white);
}

.btn-solid:hover {
  background: var(--gray-800);
}

.btn-outline {
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--black);
  color: var(--black);
}

.hero-scroll {
  padding: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.8s ease forwards;
}

.hero-scroll-line {
  width: 40px;
  height: 1px;
  background: var(--gray-200);
}

.hero-scroll-text {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--gray-400);
  letter-spacing: 0.08em;
}

.hero-bg-text {
  position: absolute;
  right: -1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(8rem, 20vw, 18rem);
  font-weight: 600;
  color: var(--gray-100);
  letter-spacing: -0.05em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  animation: fadeIn 1s 0.5s ease forwards;
}

.hero-working {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--gray-600);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.45s ease forwards;
}

.hero-working-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2a7a2a;
  box-shadow: 0 0 0 0 rgba(42, 122, 42, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(42, 122, 42, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(42, 122, 42, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(42, 122, 42, 0);
  }
}

/* SECTION LAYOUT */
section {
  padding: 6rem 3rem;
}

hr {
  border: none;
  border-top: 1px solid var(--gray-100);
  margin: 0 3rem;
}

.label {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--gray-200);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 3.5rem;
}

.section-title strong {
  font-weight: 600;
}

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

.about-text {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--gray-600);
  font-weight: 300;
}

.about-text p+p {
  margin-top: 1.2rem;
}

.edu-block {
  border: 1px solid var(--gray-100);
  padding: 2rem;
}

.edu-label {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 1.2rem;
}

.edu-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.edu-degree {
  font-size: 0.85rem;
  color: var(--gray-600);
  font-weight: 300;
  line-height: 1.5;
}

.edu-meta {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--gray-400);
}

/* SKILLS */
.skills-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--gray-100);
}

.skill-col {
  background: var(--white);
  padding: 2rem;
}

.skill-col-title {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.skill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.skill-row:last-child {
  border-bottom: none;
}

.skill-n {
  font-size: 0.82rem;
  color: var(--gray-800);
}

.skill-badge {
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  background: var(--gray-100);
  color: var(--gray-600);
}

.skill-badge.hi {
  background: var(--black);
  color: var(--white);
}

/* PROJECTS SECTIONS */
.projects-section-block {
  margin-bottom: 3.5rem;
}

.projects-section-label {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.projects-section-label::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--gray-200);
}

/* CAROUSEL */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
}

.carousel-track-outer {
  flex: 1;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  background: var(--white);
  border: 1px solid var(--gray-100);
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: stretch;
  min-height: 200px;
}

.carousel-slide .project-img-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--gray-100);
}

.carousel-slide .project-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
  transition: transform 0.5s ease, filter 0.3s;
}

.carousel-slide:hover .project-img-wrap img {
  transform: scale(1.04);
  filter: grayscale(0%);
}

.carousel-slide-body {
  padding: 2.5rem 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-genre {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
}

.project-desc {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.7;
  font-weight: 300;
  flex: 1;
}

.project-links-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: center;
}

.proj-link {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--gray-600);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 0.1rem;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.proj-link:hover {
  color: var(--black);
  border-color: var(--black);
}

.carousel-counter {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  color: var(--gray-400);
  letter-spacing: 0.05em;
  margin-left: auto;
}

/* CAROUSEL BUTTONS */
.carousel-btn {
  background: var(--white);
  border: 1px solid var(--gray-100);
  color: var(--gray-600);
  font-size: 1rem;
  width: 2.75rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.carousel-btn:disabled {
  display: none;
}

/* DOTS */
.carousel-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-200);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background: var(--black);
  transform: scale(1.3);
}

/* CERTS */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--gray-100);
}

.cert-card {
  background: var(--white);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--black);
  position: relative;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cert-card:hover {
  background: var(--gray-100);
}

.cert-card.no-link {
  cursor: default;
}

.cert-card.no-link:hover {
  background: var(--white);
}

.cert-platform {
  font-family: var(--ff-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  display: inline-block;
  width: fit-content;
  margin-bottom: 0.3rem;
}

.cert-platform.udemy {
  background: #a435f0;
  color: white;
}

.cert-platform.skillshare {
  background: #00ff84;
  color: black;
}

.cert-platform.coursera {
  background: #0056D2;
  color: white;
}

.cert-name {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--black);
}

.cert-meta {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  color: var(--gray-400);
  margin-top: auto;
  padding-top: 0.6rem;
}

.cert-arrow {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  font-size: 0.75rem;
  color: var(--gray-400);
  transition: color 0.2s;
}

.cert-card:hover .cert-arrow {
  color: var(--black);
}

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

.contact-desc {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--gray-600);
  font-weight: 300;
  margin-bottom: 2.5rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--gray-100);
  margin-bottom: 3rem;
}

.contact-card {
  background: var(--white);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--black);
  transition: background 0.2s;
  display: block;
}

.contact-card:hover {
  background: var(--black);
}

.contact-card:hover .cc-name {
  color: var(--white);
}

.contact-card:hover .cc-label {
  color: rgba(255, 255, 255, 0.4);
}

.cc-icon {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  display: block;
}

.cc-name {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
  transition: color 0.2s;
}

.cc-label {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  color: var(--gray-400);
  transition: color 0.2s;
}

/* FORM */
.message-form-wrap {
  border: 1px solid var(--gray-100);
  padding: 2rem;
}

.form-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.form-group input,
.form-group textarea {
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 0.75rem 1rem;
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  color: var(--black);
  outline: none;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--black);
}

.form-status {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  margin-top: 0.8rem;
  display: none;
}

.form-status.success {
  color: #2a7a2a;
  display: block;
}

.form-status.error {
  color: #a33;
  display: block;
}

.form-notice {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  color: var(--gray-400);
  margin-top: 0.8rem;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--gray-100);
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-t {
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  color: var(--gray-400);
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.on {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 860px) {
  nav {
    padding: 0 1.5rem;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(245, 244, 240, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--gray-100);
    padding: 0.5rem 1.5rem 1rem;
    z-index: 199;
    gap: 0;
  }

  [data-theme="dark"] .nav-links {
    background: rgba(17, 17, 16, 0.96);
  }

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

  .nav-links li {
    display: block !important;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .hero,
  section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

  .carousel-slide {
    grid-template-columns: 1fr;
  }

  .carousel-slide .project-img-wrap {
    height: 180px;
    aspect-ratio: unset;
  }

  .carousel-slide-body {
    padding: 1.5rem;
  }

  .carousel-btn {
    width: 2.25rem;
    font-size: 0.85rem;
  }

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

  footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--black);
  color: var(--black);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--gray-200);
  cursor: pointer;
  width: 32px;
  height: 32px;
  padding: 0;
  transition: border-color 0.2s;
}

.nav-hamburger span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: var(--gray-600);
  transition: background 0.2s;
}

.nav-hamburger:hover {
  border-color: var(--black);
}

.nav-hamburger:hover span {
  background: var(--black);
}

/* LANGUAGES */
.lang-row {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
  flex-wrap: wrap;
}

.lang-badge {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lang-level {
  color: var(--gray-400);
}

/* ── Accessibility ─────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  /* Keep elements visible — just skip motion */
  .hero-eyebrow,
  .hero-name,
  .hero-role,
  .hero-bio,
  .hero-actions,
  .hero-scroll,
  .hero-working,
  .hero-bg-text {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .hero-working-dot {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}