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

:root {
  --bg: #0a0a0a;
  --card-w: 300px;
  --card-h: 420px;
  --radius: 24px;
  --text: #f0f0f0;
  --border: rgba(255, 255, 255, 0.07);
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  background: var(--bg);
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  overscroll-behavior: none;
}

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: screen;
}

.scanline {
  position: fixed;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.025);
  z-index: 101;
  pointer-events: none;
  animation: scanMove 6s linear infinite;
}

@keyframes scanMove {
  0%   { top: -2px; opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100vh; opacity: 0; }
}

#page-landing,
#page-portfolio {
  position: fixed;
  inset: 0;
  z-index: 10;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

#page-portfolio {
  opacity: 0;
  pointer-events: none;
  filter: blur(20px);
  overflow-y: auto;
  overflow-x: hidden;
}

#page-portfolio.active {
  opacity: 1;
  pointer-events: auto;
  filter: blur(0);
}

#page-landing.hidden {
  opacity: 0;
  pointer-events: none;
  filter: blur(20px);
}

.stage {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-wrapper {
  perspective: 900px;
  opacity: 0;
  filter: blur(28px);
  transform: scale(0.82);
  transition: opacity 1.3s cubic-bezier(0.22, 1, 0.36, 1),
              filter 1.3s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.card-wrapper.revealed {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.card {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  background: linear-gradient(160deg, rgba(28, 28, 28, 0.84) 0%, rgba(10, 10, 10, 0.90) 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 36px 28px;
  transform-style: preserve-3d;
  overflow: visible;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset,
              0 40px 80px rgba(0, 0, 0, 0.75),
              0 0 60px rgba(255, 255, 255, 0.015);
  animation: glitchCard 9s infinite;
  cursor: grab;
  user-select: none;
}

.card:active {
  cursor: grabbing;
}

.card-bg {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  overflow: hidden;
  pointer-events: none;
}

.card-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 28px 28px;
}

.card-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

@keyframes glitchCard {
  0%, 96%, 100% { clip-path: none; }
  97%            { clip-path: inset(28% 0 42% 0); }
  97.5%          { clip-path: inset(62% 0 8% 0); }
  98%            { clip-path: none; }
}

.card-glare {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  mix-blend-mode: overlay;
  z-index: 2;
}

.avatar-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
  transform: translateZ(20px);
  flex-shrink: 0;
}

.avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  animation: ringGlitch 5s infinite;
}

@keyframes ringGlitch {
  0%, 90%, 100% { opacity: 1; transform: scale(1); }
  91% { opacity: 0.3; transform: scale(1.05) translateX(2px); }
  92% { opacity: 0.8; transform: scale(0.97) translateX(-1px); }
  93% { opacity: 1; transform: scale(1); }
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: contrast(1.05) saturate(0.88);
  pointer-events: none;
}

.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  text-align: center;
  transform: translateZ(10px);
  position: relative;
  animation: glitchText 7s infinite;
}

@keyframes glitchText {
  0%, 93%, 100% {
    text-shadow: none;
    clip-path: none;
    transform: translateX(0);
  }
  94% {
    text-shadow: 2px 0 rgba(255, 255, 255, 0.5), -2px 0 rgba(180, 180, 180, 0.3);
    clip-path: inset(40% 0 30% 0);
    transform: translateX(-3px);
  }
  94.5% {
    text-shadow: -2px 0 rgba(255, 255, 255, 0.5), 2px 0 rgba(150, 150, 150, 0.3);
    clip-path: inset(10% 0 60% 0);
    transform: translateX(3px);
  }
  95% {
    text-shadow: none;
    clip-path: none;
    transform: translateX(0);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 26px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  color: var(--text);
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transform: translateZ(5px);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.07);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn svg {
  transition: transform 0.2s;
  pointer-events: none;
}

.portfolio-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 0.05em;
  color: #fff;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #fff;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.hero-section {
  position: relative;
  min-height: 100vh;
  background: #fff;
  color: #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  padding: 0;
}

.marquee-track {
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 10px 0;
  user-select: none;
}

.marquee-inner {
  display: flex;
  white-space: nowrap;
  animation: marqueeLeft 18s linear infinite;
}

.marquee-inner.reverse {
  animation: marqueeRight 18s linear infinite;
}

.marquee-word {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(60px, 12vw, 120px);
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.07;
  padding: 0 20px;
  color: #000;
}

@keyframes marqueeLeft  { 0% { transform: translateX(0); }    100% { transform: translateX(-50%); } }
@keyframes marqueeRight { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }

.hero-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 40px;
  z-index: 2;
}

.hero-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 18px;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(72px, 15vw, 160px);
  line-height: 0.9;
  letter-spacing: -0.01em;
  color: #000;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 16px;
  color: #555;
  max-width: 380px;
  line-height: 1.6;
  margin-bottom: 36px;
}

.hero-scroll-hint {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: bounce 2s ease-in-out infinite;
}

.hero-scroll-hint::after {
  content: '↓';
  font-size: 14px;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

.tilt-section {
  min-height: 100vh;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  position: relative;
  overflow: hidden;
}

.tilt-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(40, 40, 40, 0.8) 0%, #0a0a0a 70%);
}

.tilt-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 80px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 900px;
}

.tilt-card-wrap {
  perspective: 1000px;
}

.tilt-card {
  width: 280px;
  aspect-ratio: 16 / 10;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  transform-style: preserve-3d;
  cursor: grab;
  transition: box-shadow 0.3s;
  position: relative;
}

.tilt-card:active {
  cursor: grabbing;
}

.tilt-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.about-text {
  max-width: 380px;
}

.about-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 20px;
}

.about-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 6vw, 72px);
  line-height: 0.95;
  color: #fff;
  margin-bottom: 24px;
}

.about-body {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
  margin-bottom: 32px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  font-size: 11px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.projects-section {
  background: #fff;
  padding: 100px 40px;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 60px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 8vw, 96px);
  color: #000;
  line-height: 0.9;
}

.project-count {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: #aaa;
  padding-bottom: 8px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.project-item {
  background: #f5f5f5;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s;
  cursor: pointer;
  border: 1px solid #e8e8e8;
}

.project-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
}

.project-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
  transition: filter 0.4s;
}

.project-item:hover .project-img {
  filter: grayscale(0%);
}

.project-info {
  padding: 20px 22px 22px;
}

.project-tag {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 8px;
}

.project-name {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
}

.project-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 18px;
}

.slide-track {
  width: 100%;
  height: 48px;
  background: #e4e4e4;
  border-radius: 99px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.slide-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #aaa;
  pointer-events: none;
  user-select: none;
}

.slide-thumb {
  width: 40px;
  height: 40px;
  background: #111;
  border-radius: 50%;
  position: absolute;
  left: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  transition: background 0.2s;
  z-index: 2;
}

.slide-thumb:active {
  cursor: grabbing;
}

.slide-thumb.released {
  background: #333;
  transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-section {
  min-height: 100vh;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.footer-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 10vw, 120px);
  color: rgba(255, 255, 255, 0.06);
  letter-spacing: 0.05em;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
}

.footer-icons {
  display: flex;
  gap: 40px;
  z-index: 2;
}

.footer-icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s, transform 0.3s;
}

.footer-icon-link:hover {
  color: #fff;
  transform: scale(1.1);
}

.footer-icon-link svg {
  width: 40px;
  height: 40px;
}

.footer-icon-label {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer-copy {
  position: absolute;
  bottom: 30px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.15);
  text-align: center;
}

.blur-in {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.blur-in.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

@media (max-width: 700px) {
  .tilt-content { gap: 40px; }
  .portfolio-nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .projects-section { padding: 60px 20px; }
}

@media (min-width: 480px) {
  :root {
    --card-w: 330px;
    --card-h: 450px;
  }
  .card-title { font-size: 34px; }
  .avatar-wrap { width: 156px; height: 156px; }
}

