/* =========================
    Global Styles & Theme Tokens
   ========================= */

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

html {
  color-scheme: light;
}

:root {
  /* Font */
  --font-family: "Sour Gummy", sans-serif;

  /* Brand (mint) */
  --mint-50:  #e9fbf4;
  --mint-100: #ccf6df;
  --mint-200: #b9edda;
  --mint-300: #8fe1c0;
  --mint-400: #79d3af;
  --mint-500: #61a385;
  --mint-600: #4a9c8c;
  --mint-700: #178d62;

  /* Accent (soft pink you already use) */
  --pink-300: #ffd0f0;
  --pink-400: #fbe1f9;
  --pink-500: #d8a8cf;

  /* Neutrals */
  --ink: #121815;
  --stone-700: #2d3931;
  --stone-600: #59625d;
  --stone-500: #666f6a;
  --paper: #ffffff;

  /* Background images */
  --bg-image: url("images/light-background.jpg");

  /* Surfaces / text */
  --bg-overlay: rgba(255, 255, 255, 0.35);
  --surface: rgba(255, 255, 255, 0.22);
  --surface-strong: rgba(255, 255, 255, 0.35);
  --text: var(--stone-700);
  --text-muted: var(--stone-500);
  --heading: var(--stone-700);

  /* Borders / shadows */
  --border: rgba(97, 163, 133, 0.55);
  --shadow-sm: 0 8px 18px rgba(12, 70, 45, 0.12);
  --shadow-md: 0 14px 32px rgba(12, 70, 45, 0.18);
  --shadow-lg: 0 22px 60px rgba(102, 234, 172, 0.26);

  /* Radius + blur */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --blur: 10px;

  /* Gradients */
  --gradient-mint: linear-gradient(135deg, var(--mint-500), var(--mint-100));
  --gradient-mint-deep: linear-gradient(135deg, var(--mint-400), var(--mint-600));
  --gradient-title: linear-gradient(135deg, var(--stone-700), var(--mint-300));
  --gradient-hero: linear-gradient(90deg, var(--stone-500), var(--pink-500));

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 180ms;
  --t-med: 300ms;

  /* Layout */
  --container: 100vw;
  --pad-x: 16px;
}

/* ---- Dark Theme Tokens ---- */
[data-theme="dark"] {
  color-scheme: dark;

  --bg-image: url("images/dark-background.jpg");

  /* Dark surfaces */
  --bg-overlay: rgba(0, 0, 0, 0.45);
  --surface: rgba(20, 28, 23, 0.56);
  --surface-strong: rgba(20, 28, 23, 0.72);

  /* Text */
  --text: rgba(233, 251, 244, 0.92);
  --text-muted: rgba(204, 246, 223, 0.72);
  --heading: rgba(233, 251, 244, 0.95);

  /* Borders / shadows */
  --border: rgba(143, 225, 192, 0.42);
  --shadow-sm: 0 10px 20px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, 0.42);

  /* Gradients tuned for dark */
  --gradient-title: linear-gradient(135deg, rgba(233, 251, 244, 0.92), var(--mint-300));
  --gradient-hero: linear-gradient(90deg, var(--mint-300), var(--pink-500));
}

/* ---- Global ---- */
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  font-weight: 400;
  font-style: normal;
  font-size: 15px;
  color: var(--text);

  /* Prevent horizontal scroll on mobile */
  overflow-x: hidden;

  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll;
  }
}

/* gentle overlay for readability (works both themes) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--bg-overlay),
    rgba(0, 0, 0, 0)
  );
  pointer-events: none;
  z-index: -1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* =========================
   Navigation
   ========================= */
nav {
  position: relative;
  top: 0;
  width: 100%;
  max-width: 100vw;
  padding: 10px var(--pad-x) 6px;
  z-index: 2000;

  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));

  background: linear-gradient(135deg, #666f6a, #666f6a, #2d3931, #59625d);

  box-shadow: var(--shadow-md);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}

nav:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

nav.scrolled {
  box-shadow: 0 10px 34px rgba(102, 234, 172, 0.25);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo img {
  width: 300px;
  height: auto;
  border-radius: 6px;
  display: block;
}

/* Links */
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--mint-300);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.5rem;
  position: relative;
  transition: color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 3px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint-400), var(--mint-600));
  transition: width var(--t-med) var(--ease);
}

.nav-links a:hover {
  color: var(--mint-200);
  transform: translateY(-1px);
}
.nav-links a:hover::after {
  width: 100%;
}

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 0 18px rgba(143, 225, 192, 0.22);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}

.theme-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 0 22px rgba(143, 225, 192, 0.32);
}

.theme-icon {
  font-size: 26px;
  transition: transform var(--t-med) var(--ease);
}

.theme-toggle:hover .theme-icon {
  transform: rotate(18deg);
}

/* =========================
   Hero
   ========================= */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5%;
  position: relative;
}

.container {
  max-width: var(--container);
  width: 100%;
  text-align: center;
  margin: 0 auto;
  padding: 0 20px;
  animation: fadeInUp 800ms var(--ease) both;
}

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

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);

  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  animation: fadeInUp 900ms var(--ease) 120ms both;
}

.hero h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--mint-500);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.18);
  animation: fadeInUp 900ms var(--ease) 240ms both;
}

#typing {
  font-size: 2rem;
  border-right: 3px solid rgba(127, 127, 127, 0.7);
  padding-right: 6px;
  white-space: nowrap;
  overflow: hidden;
}

.cursor-blink {
  animation: blink 800ms infinite;
}
@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.name-object {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 1rem;
}

.name-object img {
  width: 35px;
  height: auto;
  border-radius: 50%;
  animation: fadeInUp 900ms var(--ease) 320ms both;
}

.hero p {
  margin: 0 auto 3rem;
  max-width: 70ch;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.14);
  animation: fadeInUp 900ms var(--ease) 360ms both;
}

.hero .motto {
  margin-top: 20px;
  font-size: 22px;
  color: var(--text-muted);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.14);
  font-style: italic;
}

/* Buttons */
.cta-buttons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 900ms var(--ease) 520ms both;
}

.btn {
  padding: 1rem 2.25rem;
  font-size: 25px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  /* Prevent tiny tap targets on mobile */
  min-height: 44px;

  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
    background var(--t-med) var(--ease), color var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
}

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

.btn-primary {
  background: var(--gradient-mint);
  color: var(--stone-700);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(102, 234, 172, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid transparent;
  color: var(--mint-500);
  border-color: rgba(97, 163, 133, 0.7);
}

[data-theme="dark"] .btn-secondary {
  background: rgba(20, 28, 23, 0.52);
  color: var(--mint-200);
  border-color: rgba(143, 225, 192, 0.38);
}

.btn-secondary:hover {
  background: var(--mint-500);
  color: white;
  transform: translateY(-3px);
}

/* =========================
   Sections
   ========================= */
section {
  padding: 6rem 5%;
  max-width: var(--container);
  margin: 0 auto;
}

.section-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  text-align: center;

  background: var(--gradient-title);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 2rem;
  margin: 0 0 4rem;
}

.about-me {
  max-width: 700px;
  margin: 0 auto 20px;
  border: 1px solid rgba(216, 168, 207, 0.75);
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  padding: 14px 16px;
  border-radius: var(--radius-md);
  text-align: center;
}

.about-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6rem;
  border-radius: var(--radius-md);
  margin-bottom: 80px;
}

.about-photo {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 60px rgba(105, 255, 220, 0.3);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}

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

.about-content p {
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 70ch;
  margin: 0;
  font-size: 18px;
}

.about-extra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}

.about-extra-card {
    background: var(--surface);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    transition: transform var(--t-med) var(--ease),
                box-shadow var(--t-med) var(--ease),
                border-color var(--t-med) var(--ease);
}

.about-extra-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(143, 225, 192, 0.75);
}

.about-extra-card h3 {
    text-align: center;
    font-size: 1.4rem;
    color: var(--pink-500);
    margin: 0 0 1.2rem;
}

.resume-btn-wrapper {
    text-align: center;
    margin: 0 0 2.5rem;
}

/* Languages */
.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.about-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    color: var(--text-muted);
}

.lang-name {
    font-weight: 500;
    color: var(--text);
}

.lang-level {
    font-size: 0.8rem;
    padding: 3px 12px;
    border-radius: 999px;
    font-weight: 600;
}

.lang-level.native {
    background: rgba(143, 225, 192, 0.2);
    border: 1px solid rgba(143, 225, 192, 0.5);
    color: var(--mint-600);
}

[data-theme="dark"] .lang-level.native {
    color: var(--mint-300);
}

.lang-level.fluent {
    background: rgba(216, 168, 207, 0.2);
    border: 1px solid rgba(216, 168, 207, 0.5);
    color: var(--pink-500);
}

/* Hobbies */
.hobby-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.hobby-tag {
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(143, 225, 192, 0.12);
    border: 1px solid rgba(143, 225, 192, 0.3);
    color: var(--text-muted);
    transition: transform var(--t-fast) var(--ease),
                background var(--t-fast) var(--ease);
}

.hobby-tag:hover {
    transform: scale(1.06);
    background: rgba(143, 225, 192, 0.25);
}

/* =========================
   Cards (skills, timeline, contact)
   ========================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.skill-card,
.timeline-content,
.contact-method {
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease);
}

.skill-card {
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.skill-card:hover,
.timeline-content:hover,
.contact-method:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(143, 225, 192, 0.75);
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mint-400);
}

.skill-card h3 {
  text-align: center;
  font-size: 1.8rem;
  color: var(--pink-500);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.14);
  margin: 0 0 1rem;
}

.skill-card p {
  color: var(--text-muted);
  line-height: 1.8;
  text-align: center;
  margin: 0;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.tech-tag {
  border-radius: 10px;
  padding: 2px 4px;
  color: var(--text);
  background: rgba(143, 225, 192, 0.14);
  border: 1px solid rgba(143, 225, 192, 0.22);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.tech-tag:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .tech-tag {
  background: rgba(143, 225, 192, 0.4);
  border: 1px solid rgba(143, 225, 192, 0.6);
}



/* =========================
   Projects Carousel
   ========================= */
.projects-carousel {
  position: relative;
}

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 380px);
  gap: 18px;

  overflow-x: auto;
  padding: 14px 40px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}

.project-card {
  position: relative;
  height: 430px;
  scroll-snap-align: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.22);
}

/* Background images for each card */
.project-card:nth-child(1) { background-image: url("images/tinytasks.jpg"); }
.project-card:nth-child(2) { background-image: url("images/dental-project.png"); }
.project-card:nth-child(3) { background-image: url("images/restaurant-project.jpg"); }
.project-card:nth-child(4) { background-image: url("images/calendar.jpg"); }
.project-card:nth-child(5) { background-image: url("images/rad_racer.jpg"); }
.project-card:nth-child(6) { background-image: url("images/mazegame.jpg"); }
.project-card:nth-child(7) { background-image: url("images/valentine.jpg"); }

.project-overlay {
  position: absolute;
  inset: 0;
  padding: 1.5rem;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  background: linear-gradient(
    to top,
    rgba(20, 28, 23, 0.92),
    rgba(20, 28, 24, 0.45)
  );

  color: var(--pink-300);
  line-height: 20px;
  font-size: 14px;

  transform: translateY(100%);
  transition: transform 600ms var(--ease);
}

.project-card:hover .project-overlay {
  transform: translateY(0);
}

.project-overlay .content {
  text-align: center;
  font-weight: 550;
}

.project-overlay .content h3 {
  margin: 0 0 0.8rem;
  font-size: 1.6rem;
  color: var(--mint-200);
  text-shadow: 0 0 5px rgba(216, 168, 207, 1);
}

.project-overlay .content p {
  max-width: 95%;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-style: italic;
  text-shadow: pink 0px 0px 4px;
}

.project-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.project-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--mint-300);
  text-decoration: none;
  transition: transform var(--t-med) var(--ease), color var(--t-med) var(--ease);
  white-space: nowrap;
}

.project-link a:hover {
  color: var(--mint-200);
  transform: translateX(3px);
}

.project-link a img {
  width: 16px;
  height: 16px;
  filter: invert(100%) sepia(100%) grayscale(100%) brightness(160%);
}

/* Arrow buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;

  width: 40px;
  height: 40px;
  border-radius: 999px;

  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;

  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: background var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}

[data-theme="dark"] .carousel-btn {
  background: rgba(20, 28, 23, 0.62);
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scale(1.04);
}
[data-theme="dark"] .carousel-btn:hover {
  background: rgba(20, 28, 23, 0.78);
}

.carousel-btn.prev { left: 6px; }
.carousel-btn.next { right: 6px; }

@media (min-width: 900px) {
  .carousel-track {
    grid-auto-columns: minmax(320px, 400px);
  }
}

/* =========================
   Timeline
   ========================= */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 3rem auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  opacity: 0.65;
  background: linear-gradient(180deg, var(--mint-400), var(--mint-600));
}

.timeline-item {
  margin-bottom: 3rem;
  position: relative;
}

.timeline-content {
  padding: 2rem;
  width: 420px;
  max-width: 90%;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: 60px;
  margin-left: auto;
}
.timeline-item:nth-child(even) .timeline-content {
  margin-left: 60px;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 2rem;

  width: 20px;
  height: 20px;
  border-radius: 50%;

  background: var(--gradient-mint-deep);
  border: 4px solid var(--pink-400);
  box-shadow: 0 0 22px rgba(102, 234, 172, 0.35);
}

.timeline-content h3 {
  margin: 0 0 0.25rem;
  font-size: 1.6rem;
  color: var(--mint-700);
  text-shadow: 0 0 5px rgba(216, 168, 207, 1);
}

[data-theme="dark"] .timeline-content h3 {
  color: var(--mint-300);
}

.timeline-content .company {
  color: var(--pink-500);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.timeline-content .date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
  font-style: italic;
}

.timeline-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
}

/* =========================
   Contact
   ========================= */
.contact-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.contact-method {
  padding: 2rem;
  text-decoration: none;
  color: var(--mint-700);
}

[data-theme="dark"] .contact-method {
  color: var(--mint-200);
}

.contact-method .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.contact-method h3 {
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.contact-method p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

[data-theme="dark"] .contact-method img {
  filter: invert(100%) sepia(100%) grayscale(100%) brightness(160%) drop-shadow(0 0 4px rgba(216, 168, 207, 1));
}

.footer {
  text-align: center;
  color: var(--mint-200);
  font-size: 1rem;
  padding: 1.2rem 1rem;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  background: linear-gradient(135deg, #666f6a, #666f6a, #2d3931, #59625d);
}

.social-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  transition: transform var(--t-med) var(--ease)
}

.social-links a img {
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}

.social-links a:hover img {
  filter: invert(100%) sepia(100%) grayscale(100%) brightness(160%) drop-shadow(0 0 4px rgba(216, 168, 207, 1));
  transform: scale(1.4);
}

[data-theme="dark"] .social-links a img {
  filter: invert(100%) sepia(100%) grayscale(100%) brightness(160%) drop-shadow(0 0 4px rgb(168, 216, 190));
}


/* =========================
   Responsive — Large screens (1400px+)
   ========================= */
@media (min-width: 1400px) {
  :root {
    --pad-x: 32px;
  }

  .hamburger {
    display: none;
  }

  .nav-container {
    padding: 0 32px;
  }

  .logo img {
    width: 340px;
  }

  .nav-links {
    gap: 3rem;
  }

  section {
    padding: 8rem 6%;
  }

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

  .timeline-content {
    width: 500px;
  }

  .carousel-track {
    grid-auto-columns: minmax(360px, 440px);
    padding: 14px 60px;
  }

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

/* =========================
   Responsive — Tablet (601px – 899px)
   ========================= */
@media (max-width: 899px) and (min-width: 601px) {
  .logo img {
    width: 220px;
  }

  .hamburger {
    display: none;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .hero {
    min-height: 75vh;
    padding: 0 6%;
  }

  #typing {
    font-size: 1.6rem;
  }

  .hero .motto {
    font-size: 18px;
  }

  .btn {
    font-size: 20px;
    padding: 0.85rem 1.75rem;
  }

  section {
    padding: 4rem 5%;
  }

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

  /* Collapse timeline to single-column */
  .timeline::before {
    left: 18px;
    transform: none;
  }

  .timeline-dot {
    left: 18px;
    transform: none;
  }

  .timeline-content {
    width: 100%;
    max-width: 100%;
    margin-left: 50px !important;
    margin-right: 0 !important;
  }

  .carousel-track {
    grid-auto-columns: minmax(260px, 340px);
    padding: 14px 20px;
  }

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

  /* Stack about section on tablet too */
  .about-content {
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 40px;
  }

  .about-photo {
    max-width: 320px;
    /* Disable problematic shadow on smaller screens */
    box-shadow: 0 20px 40px rgba(105, 255, 220, 0.2);
  }
}

/* =========================
   Responsive — Mobile (≤ 600px)
   ========================= */
@media (max-width: 600px) {
  :root {
    --pad-x: 12px;
  }

  /* ---- Nav ---- */
  .nav-container {
      gap: 10px;
  }

  .logo img {
      width: 140px;
  }

  /* Hide links by default on mobile */
  .nav-links {
      display: none;
      flex-direction: column;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      width: 100%;
      padding: 12px 20px 16px;
      gap: 0;
      background: linear-gradient(135deg, #666f6a, #2d3931);
      border-top: 1px solid rgba(143, 225, 192, 0.25);
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
      z-index: 1999;
  }

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

  .nav-links li {
      border-bottom: 1px solid rgba(143, 225, 192, 0.12);
  }

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

  .nav-links a {
      display: block;
      font-size: 1.1rem;
      padding: 13px 4px;
  }

  /* Hamburger button */
  .hamburger {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      background: transparent;
      border: 1px solid rgba(255, 255, 255, 0.18);
      border-radius: 999px;
      padding: 10px 12px;
      cursor: pointer;
      box-shadow: 0 0 18px rgba(143, 225, 192, 0.22);
      transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
  }

  .hamburger:hover {
      transform: scale(1.08);
      box-shadow: 0 0 22px rgba(143, 225, 192, 0.32);
  }

  .hamburger span {
      display: block;
      width: 22px;
      height: 2px;
      background: var(--mint-200);
      border-radius: 2px;
      transition: transform var(--t-med) var(--ease), opacity var(--t-med) var(--ease);
  }

  /* Animate to X when open */
  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ---- Hero ---- */
  .hero {
    min-height: 70vh;
    padding: 2rem 5% 3rem;
    align-items: flex-start;
  }

  .container {
    padding: 0 8px;
  }

  .name-object {
    flex-direction: column;
    gap: 8px;
  }

  #typing {
    font-size: 1.3rem;
    white-space: normal;
    border-right: none;
  }

  .hero .motto {
    font-size: 16px;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    font-size: 18px;
    padding: 0.8rem 1.5rem;
  }

  /* ---- Sections ---- */
  section {
    padding: 3rem 4%;
  }

  .section-subtitle {
    font-size: 1rem;
    line-height: 1.7rem;
    margin: 0 0 2.5rem;
  }

  /* ---- About ---- */
  .about-me {
    max-width: 100%;
    padding: 12px;
  }

  /* Stack photo above text on mobile */
  .about-content {
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 40px;
    text-align: center;
  }

  .about-photo {
    max-width: 260px;
    width: 80%;
    /* Lighter shadow — heavy shadows render poorly on mobile */
    box-shadow: 0 16px 32px rgba(105, 255, 220, 0.2);
  }

  .about-content p {
    font-size: 16px;
    text-align: center;
  }

  /* ---- Skills ---- */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .skill-card {
    padding: 1.5rem;
  }

  /* ---- Carousel ---- */
  .carousel-track {
    grid-auto-columns: minmax(260px, 85vw);
    padding: 10px 12px;
    gap: 12px;
  }

  .project-card {
    height: 360px;
  }

  /* Always show overlay on mobile (no hover on touch) */
  .project-overlay {
    transform: translateY(0);
    background: linear-gradient(
      to top,
      rgba(20, 28, 23, 0.95),
      rgba(20, 28, 24, 0.55)
    );
  }

  /* ---- Timeline — single column, left-aligned ---- */
  .timeline::before {
    left: 14px;
    transform: none;
  }

  .timeline-dot {
    left: 14px;
    transform: none;
    top: 1.5rem;
    width: 16px;
    height: 16px;
  }

  .timeline-content {
    width: 100%;
    max-width: 100%;
    margin-left: 42px !important;
    margin-right: 0 !important;
    padding: 1.25rem;
  }

  .timeline-content h3 {
    font-size: 1.3rem;
  }

  /* ---- Contact ---- */
  .contact-methods {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .contact-method {
    padding: 1.5rem;
  }

  /* ---- Footer ---- */
  .footer {
    padding: 1.5rem 1rem;
  }

  .social-links {
    gap: 1.2rem;
  }
}

/* =========================
   Extra small phones (≤ 380px)
   ========================= */
@media (max-width: 380px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero h2 {
    font-size: 1.2rem;
  }

  #typing {
    font-size: 1.1rem;
  }

  .btn {
    font-size: 16px;
    max-width: 240px;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  .logo img {
    width: 130px;
  }

  .about-photo {
    max-width: 200px;
  }

  .skill-card h3 {
    font-size: 1.5rem;
  }

  .timeline-content {
    margin-left: 34px !important;
    padding: 1rem;
  }

  .timeline-content h3 {
    font-size: 1.1rem;
  }
  .resume-btn-wrapper {
    margin: 0 0 2rem;
  }

  .resume-btn-wrapper .btn {
      font-size: 16px;
      padding: 0.75rem 1.5rem;
      width: 100%;
      max-width: 260px;
  }

  .about-extra-grid {
      grid-template-columns: 1fr;
      gap: 1rem;
      margin: 1.5rem 0 2rem;
  }

  .about-extra-card {
      padding: 1.25rem;
  }

  .about-extra-card h3 {
      font-size: 1.2rem;
      margin-bottom: 1rem;
  }

  .hobby-tags {
      gap: 0.5rem;
  }

  .hobby-tag {
      font-size: 0.8rem;
      padding: 4px 10px;
  }

  .about-list li {
      font-size: 0.95rem;
  }
}