/* =====================================================
   Global
   ===================================================== */

:root {
  --scroll-progress: 0;
}

html {
  scroll-behavior: smooth;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.headlines-serif {
  font-family: 'Newsreader', serif;
}

.labels-mono {
  font-family: 'Space Grotesk', monospace;
}

.glass-panel {
  background: rgba(53, 53, 52, 0.4);
  backdrop-filter: blur(12px);
}

.glow-hover:hover {
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

/* =====================================================
   Hero
   ===================================================== */

/* Layout */

section#hero {
  position: relative;
  min-height: 180vh;
  min-height: 180dvh;
}

.hero-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(19, 19, 19, 0.58), rgba(19, 19, 19, 0.82)),
    url("../images/hero/chessboard.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-content {
  position: relative;
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Visual */

.hero-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
}

.glow-1 {
  width: 360px;
  height: 360px;
  left: 18%;
  bottom: 16%;
  background: rgba(0, 229, 255, 0.22);
}

.glow-2 {
  width: 520px;
  height: 520px;
  right: 8%;
  top: 10%;
  background: rgba(60, 110, 255, 0.16);
}

/* Copy */

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 780px;
  text-align: center;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(3.8rem, 7.5vw, 8rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.hero-copy h1 span {
  display: block;
  margin-top: 10px;
  color: rgba(234, 242, 255, 0.75);
}

.hero-text {
  margin: 0 auto;
  max-width: 520px;
  line-height: 1.8;
  font-size: 1.05rem;
}

/* Motion */

.piece-entrance {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(220px) scale(0.88);
  filter: blur(10px);
}

.piece-entrance.is-visible {
  animation: pieceEnter 1.5s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.piece-scroll {
  transform:
    translateY(calc(var(--scroll-progress) * -520px))
    scale(calc(1 - (var(--scroll-progress) * 0.18)))
    rotate(calc(var(--scroll-progress) * -10deg));
  opacity: calc(1 - (var(--scroll-progress) * 1.1));
  will-change: transform, opacity;
}

.hero-piece {
  width: clamp(900px, 100vw, 1800px);
  max-width: none;
  max-height: 95vh;
  object-fit: contain;
  opacity: 0.55;
  filter:
    drop-shadow(0 0 20px rgba(0, 229, 255, 0.32))
    drop-shadow(0 0 90px rgba(0, 229, 255, 0.24))
    drop-shadow(0 0 160px rgba(0, 229, 255, 0.14));
  animation: floatPiece 5s ease-in-out 1.6s infinite;
}

/* Hero responsive */

@media (min-width: 1600px) {
  .hero-sticky {
    background-size: 100% auto;
    background-position: center bottom;
  }
}

@media (max-height: 800px) {
  .hero-piece {
    max-height: 85vh;
    width: clamp(500px, 70vw, 1100px);
  }
}

@media (min-width: 1400px) {
  .hero-piece {
    width: clamp(900px, 60vw, 1400px);
  }
}

/* =====================================================
   Projects
   ===================================================== */

.projects-scroll {
  position: relative;
  height: 500vh;
  background: #090b10;
}

.projects-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.projects-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(7, 9, 15, 0.45), rgba(7, 9, 15, 0.8)),
    url('https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  z-index: -3;
}

.projects-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(4, 6, 10, 0.78), rgba(4, 6, 10, 0.3)),
    linear-gradient(to top, rgba(4, 6, 10, 0.88), rgba(4, 6, 10, 0.1));
  z-index: -2;
}

.projects-word-wrap {
  position: absolute;
  left: 5vw;
  top: 10vh;
  z-index: 1;
  pointer-events: none;
}

.projects-word-wrap .font-label {
  margin-bottom: 1rem;
}

.projects-word {
  font-size: clamp(4rem, 16vw, 13rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.9;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 12px 50px rgba(0, 0, 0, 0.28);
  will-change: transform, opacity;
}

.projects-track {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.project-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, 80vw);
  border-radius: 28px;
  background: rgba(13, 17, 23, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  will-change: transform, opacity;
  pointer-events: none;
}

.project-card .thumb {
  height: 160px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
  color: #f5f7fb;
}

.project-card p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
  line-height: 1.65;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tags span {
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #8ab4ff;
  border: 1px solid rgba(138, 180, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  align-self: flex-start;
  pointer-events: auto;
}

.card-link:hover {
  background: rgba(138, 180, 255, 0.12);
  border-color: rgba(138, 180, 255, 0.6);
  color: #fff;
}

.card-link svg {
  width: 13px;
  height: 13px;
  transition: transform 0.25s ease;
}

.card-link:hover svg {
  transform: translate(3px, -3px) rotate(8deg);
}

.projects-mobile {
  display: none;
}

/* =====================================================
   Skills
   ===================================================== */

#skills.skills-section {
  padding: 8rem 0;
  overflow: visible;
  max-width: 100%;
}

.skills-section-inner {
  max-width: 1280px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
  text-align: center;
}

.skills-section-inner h2 {
  font-size: clamp(3rem, 6vw, 4.8rem);
  line-height: 1;
}

.tech-rows-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1rem 0 2rem;
  overflow: visible;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.tech-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: nowrap;
  width: max-content;
  margin: 0 auto;
  will-change: transform;
  transition: transform 0.08s linear;
}

.tech-pill {
  display: flex;
  align-items: center;
  white-space: nowrap;
  cursor: default;
  position: relative;
  font-family: 'Newsreader', serif;
  font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(229, 226, 225, 0.22);
  letter-spacing: -0.03em;
  padding: 0.2em 0.55em;
  transition: -webkit-text-stroke 0.3s, color 0.3s;
  user-select: none;
}

.tech-pill:hover {
  color: #00e5ff;
  -webkit-text-stroke: 1px #00e5ff;
}

.tech-pill::after {
  content: '·';
  font-size: 0.5em;
  color: rgba(186, 201, 204, 0.45);
  -webkit-text-stroke: 0;
  margin-left: 0.5em;
  opacity: 0.7;
  vertical-align: middle;
}

.tech-pill:last-child::after {
  display: none;
}

.row-spacer {
  height: 5.25rem;
}

.tech-mobile-grid {
  display: none;
}

/* =====================================================
   Education
   ===================================================== */

.education-section {
  position: relative;
  height: 420vh;
  background:
    radial-gradient(circle at top left, rgba(0, 229, 255, 0.05), transparent 26%),
    linear-gradient(180deg, #111314 0%, #131313 100%);
}

.education-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.education-inner {
  width: 100%;
  height: 100%;
  position: relative;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
}

.education-heading {
  position: absolute;
  top: 72px;
  left: 48px;
  z-index: 20;
  max-width: 640px;
}

.education-heading h2 {
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.95;
  margin: 0 0 18px;
}

.education-heading p {
  max-width: 560px;
  line-height: 1.75;
  font-size: 1rem;
  margin: 0;
}

.education-cards-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.education-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% - 96px);
  min-height: 370px;
  transform: translate(-50%, -50%);
  border-radius: 30px;
  overflow: hidden;
  color: #ffffff;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.32),
    0 10px 28px rgba(0, 0, 0, 0.16);
  will-change: transform, opacity;
}

.education-card-inner {
  min-height: 370px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 28px;
  align-items: center;
  padding: 48px;
}

.education-card-copy small {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.78;
  font-family: 'Space Grotesk', monospace;
}

.education-card-copy h3 {
  font-family: 'Newsreader', serif;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 0.98;
  margin: 0 0 16px;
  letter-spacing: -0.04em;
}

.education-card-copy p {
  margin: 0;
  max-width: 540px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.8;
  font-size: 1rem;
}

.education-meta {
  align-self: stretch;
  justify-self: end;
  width: 100%;
  max-width: 290px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.education-meta strong {
  display: block;
  font-family: 'Space Grotesk', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 8px;
}

.education-meta span {
  display: block;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.education-meta .meta-gap {
  margin-top: 18px;
}

.education-meta a {
  color: #9cf0ff;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.education-meta a:hover {
  color: #ffffff;
}

.education-card-1 {
  background: linear-gradient(135deg, #0f172a 0%, #1f2937 100%);
}

.education-card-2 {
  background: linear-gradient(135deg, #004f58 0%, #001f24 100%);
}

.education-card-3 {
  background: linear-gradient(135deg, #4338ca 0%, #1e1b4b 100%);
}

.education-card-4 {
  background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
}

.education-card-5 {
  background: linear-gradient(135deg, #7c2d12 0%, #431407 100%);
}

.education-scroll-hint {
  position: absolute;
  left: 48px;
  bottom: 34px;
  z-index: 20;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(229, 226, 225, 0.45);
}

/* =====================================================
   Navigation
   ===================================================== */

.nav-connect {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(229, 226, 225, 0.65);
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-connect::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(156, 240, 255, 0.7),
    transparent
  );
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.nav-connect:hover {
  color: #9cf0ff;
  transform: translateY(-1px);
}

.nav-connect:hover::after {
  transform: scaleX(1);
}

.nav-connect-text {
  position: relative;
}

.nav-connect-icon {
  font-size: 0.85rem;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0.7;
}

.nav-connect:hover .nav-connect-icon {
  transform: translate(3px, -3px);
  opacity: 1;
}

.nav-connect:active {
  transform: scale(0.96);
}

.mobile-nav-toggle {
  display: none;
}

.mobile-nav-panel {
  display: none;
}

/* =====================================================
   Contact
   ===================================================== */

.contact-section {
  position: relative;
  padding: 8rem 1.5rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 229, 255, 0.06), transparent 24%),
    radial-gradient(circle at 80% 30%, rgba(76, 110, 245, 0.07), transparent 26%),
    linear-gradient(180deg, #090909 0%, #050505 100%);
  overflow: hidden;
}

.contact-shell {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
}

.contact-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.contact-glow-1 {
  width: 300px;
  height: 300px;
  left: 4%;
  top: 12%;
  background: rgba(0, 229, 255, 0.14);
}

.contact-glow-2 {
  width: 360px;
  height: 360px;
  right: 2%;
  bottom: 6%;
  background: rgba(75, 85, 255, 0.12);
}

.contact-panel {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 4rem 3rem 3rem;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.contact-header {
  margin-bottom: 3rem;
}

.contact-title {
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin: 0 0 1.25rem;
  color: #f4f1ee;
}

.contact-intro {
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 1rem;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.contact-field {
  position: relative;
}

.contact-label {
  display: block;
  margin-bottom: 0.7rem;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(186, 201, 204, 0.38);
}

.contact-input,
.contact-textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.025);
  color: #e5e2e1;
  border-radius: 18px;
  padding: 1rem 1.1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  line-height: 1.6;
  outline: none;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: rgba(186, 201, 204, 0.38);
}

.contact-input:hover,
.contact-textarea:hover {
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.035);
}

.contact-input:focus,
.contact-textarea:focus {
  border-color: rgba(0, 229, 255, 0.55);
  background: rgba(255,255,255,0.045);
  box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.08);
}

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

.contact-actions {
  display: flex;
  justify-content: center;
  padding-top: 0.75rem;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-width: 220px;
  padding: 1rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  color: rgba(229, 226, 225, 0.92);
  font-family: 'Space Grotesk', monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 10px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    color 0.25s ease;
}

.contact-button:hover {
  transform: translateY(-2px);
  border-color: rgba(156, 240, 255, 0.32);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 14px 34px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(156, 240, 255, 0.08);
}

.contact-button:active {
  transform: translateY(0) scale(0.985);
}

.contact-button-icon {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.72;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.contact-button:hover .contact-button-icon {
  transform: translate(2px, -2px);
  opacity: 1;
}

.contact-button::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.06),
    transparent 35%,
    transparent 65%,
    rgba(156, 240, 255, 0.04)
  );
  opacity: 1;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.2rem;
  border-radius: 20px;
  text-decoration: none;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.contact-link:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 229, 255, 0.28);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.contact-link-kicker {
  font-family: 'Space Grotesk', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(156, 240, 255, 0.7);
}

.contact-link-title {
  font-family: 'Newsreader', serif;
  font-size: 1.4rem;
  line-height: 1;
  color: #f4f1ee;
  letter-spacing: -0.03em;
}

.contact-input {
  background: rgba(255,255,255,0.025) !important;
  color: #e5e2e1 !important;
}

.contact-input:focus {
  background: rgba(255,255,255,0.045) !important;
}

/* =====================================================
   Animations
   ===================================================== */

@keyframes pieceEnter {
  0% {
    opacity: 0;
    transform: translateY(220px) scale(0.88);
    filter: blur(10px);
  }
  65% {
    opacity: 1;
    transform: translateY(-14px) scale(1.02);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes floatPiece {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* =====================================================
   Responsive Overrides
   ===================================================== */

/* Education */

@media (max-width: 900px) {
  .education-section {
    height: 520vh;
  }

  .education-inner {
    padding: 0 20px;
  }

  .education-heading {
    top: 40px;
    left: 20px;
    right: 20px;
    max-width: none;
  }

  .education-heading h2 {
    font-size: clamp(2.4rem, 10vw, 3.6rem);
  }

  .education-card {
    width: calc(100% - 40px);
    min-height: 320px;
    box-sizing: border-box;
    max-width: 100%;
  }

  .education-card-inner {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px;
    min-height: 320px;
  }

  .education-card-copy h3 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .education-card-copy p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .education-meta {
    justify-self: start;
    max-width: 100%;
  }

  .education-scroll-hint {
    left: 20px;
    bottom: 20px;
    font-size: 10px;
  }
}

@media (max-width: 767px) {
  .education-section {
    height: auto;
    padding: 7rem 0;
  }

  .education-sticky {
    position: relative;
    height: auto;
    overflow: visible;
  }

  .education-inner {
    height: auto;
    display: block;
  }

  .education-heading {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin-bottom: 2.5rem;
  }

  .education-cards-stage {
    display: grid;
    gap: 1rem;
    height: auto;
  }

  .education-card {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    min-height: unset;
    transform: none !important;
    opacity: 1 !important;
    border-radius: 22px;
  }

  .education-card-inner {
    min-height: unset;
  }

  .education-scroll-hint {
    display: none;
  }
}

/* Skills */

@media (max-width: 768px) {
  #skills.skills-section {
    padding: 7rem 0;
  }

  .skills-section-inner {
    margin-bottom: 2.5rem;
    text-align: left;
    padding: 0 1.5rem;
  }

  .skills-section-inner h2 {
    font-size: clamp(2.4rem, 10vw, 3.5rem);
  }

  .tech-rows-wrap {
    display: none;
  }

  .tech-mobile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
  }

  .tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0.55em 1em;
    border: 1px solid rgba(255,255,255,0.12);
    background: #201f1f;
    color: rgba(229, 226, 225, 0.48);
    font-family: 'Newsreader', serif;
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: -0.01em;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(14px);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .tech-chip.chip-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .tech-chip.chip-active {
    border-color: #00e5ff;
    color: #00e5ff;
    background: rgba(0, 229, 255, 0.06);
    transform: scale(1.04);
  }

  .tech-chip .chip-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.4;
    flex-shrink: 0;
    transition: opacity 0.2s;
  }

  .tech-chip.chip-active .chip-dot {
    opacity: 1;
  }
}

/* Contact */

@media (max-width: 900px) {
  .contact-panel {
    padding: 3rem 1.5rem 2rem;
    border-radius: 24px;
  }

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

  .contact-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .contact-section {
    padding: 6rem 1rem;
  }

  .contact-title {
    font-size: clamp(2.4rem, 11vw, 3.8rem);
  }

  .contact-intro {
    font-size: 0.95rem;
  }

  .contact-button {
    width: 100%;
  }

  .contact-links {
    justify-items: center;
  }

  .contact-link {
    width: min(100%, 340px);
    margin: 0 auto;
    align-items: center;
    text-align: center;
  }
}

/* Hero, Projects, Navigation */

@media (max-width: 767px) {
  section#hero {
    min-height: 120vh;
  }

  html {
    scroll-behavior: smooth;
    overflow-x: hidden;
  }

  .hero-visual {
    overflow: hidden;
  }

  .hero-piece {
    width: clamp(520px, 260vw, 900px);
    max-width: none;
  }

  .piece-scroll {
    transform:
      translateY(calc(var(--scroll-progress) * -180px))
      scale(calc(1 - (var(--scroll-progress) * 0.10)))
      rotate(calc(var(--scroll-progress) * -5deg));
  }

  .projects-desktop {
    display: none;
  }

  .projects-mobile {
    display: block;
  }

  .projects-mobile .group {
    min-height: 420px;
  }

  .projects-mobile h3 {
    font-size: 1.6rem;
    white-space: normal;
    overflow: visible;
  }

  .projects-mobile p {
    max-width: 100%;
  }

  nav {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .mobile-nav-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  }

  .mobile-nav-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: rgba(229, 226, 225, 0.9);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .mobile-nav-toggle:hover {
    border-color: rgba(156, 240, 255, 0.25);
    background: rgba(255,255,255,0.05);
  }

  .mobile-nav-toggle.is-open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .mobile-nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .mobile-nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }

  .mobile-nav-panel {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: fixed;
    top: 84px;
    left: 50%;
    transform: translateX(-50%) translateY(-12px);
    width: 90%;
    padding: 0.75rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(19, 19, 19, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 49;
  }

  .mobile-nav-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .mobile-nav-link {
    display: block;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(229, 226, 225, 0.8);
    transition: background 0.2s ease, color 0.2s ease;
  }

  .mobile-nav-link:hover,
  .mobile-nav-link:focus {
    background: rgba(255,255,255,0.05);
    color: #9cf0ff;
  }
}