/* ============================================================
   tetik.dev — Premium Portfolio Stylesheet
   Design System: Glassmorphism, Mesh Gradients, Dynamic Interactions
   ============================================================ */

/* ==================== DESIGN TOKENS ==================== */
:root {
  /* Backgrounds */
  --bg:         #030305;
  --bg-2:       #060814;
  --bg-3:       #090d22;
  
  /* Glassmorphism System */
  --glass-bg:    rgba(255, 255, 255, 0.03);
  --glass-bg-hv: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hv: rgba(255, 255, 255, 0.2);
  
  /* Accent — Purple & Blue */
  --accent:     #8b5cf6;
  --accent-lt:  #a78bfa;
  --accent-dim: rgba(139, 92, 246, 0.15);
  --cyan:       #3b82f6; /* Soft blue */
  --cyan-dim:   rgba(59, 130, 246, 0.15);

  /* Typography colors */
  --text:       #ffffff;
  --text-2:     #94a3b8;
  --text-3:     #64748b;
  --text-acc:   #c4b5fd;

  /* Gradients */
  --grad-main:  linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  --grad-text:  linear-gradient(to right, #fff 20%, #a78bfa 100%);
  --grad-border: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.01) 100%);

  /* Shadows */
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-glow:  0 0 40px rgba(139, 92, 246, 0.3);

  /* Radius */
  --r-sm: 0.5rem;
  --r-md: 1rem;
  --r-lg: 1.5rem;
  --r-xl: 2rem;

  /* Spacing */
  --section-gap: clamp(6rem, 12vw, 12rem);
  --nav-h: 5rem;

  /* Transitions */
  --t-fast:   0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --t-base:   0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --t-slow:   0.7s cubic-bezier(0.16, 1, 0.3, 1);
  --t-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  overflow-x: hidden;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display:block; max-width:100%; height:auto; }
a { color:inherit; text-decoration:none; }
ul,ol { list-style:none; }
button { font-family:inherit; cursor:pointer; border:none; background:none; }

h1,h2,h3,h4 {
  text-wrap: balance;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

p { text-wrap: pretty; }

/* ==================== ACCESSIBILITY ==================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: top var(--t-fast);
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ==================== UTILITIES ==================== */
.container {
  width: min(1200px, calc(100% - 3rem));
  margin-inline: auto;
}

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass panel utility */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}

/* Removed heavy mask gradient border for performance */

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--glass-border-hv);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
::selection { background: rgba(139,92,246,0.3); color:#fff; }

/* ==================== ANIMATIONS ==================== */
.reveal-element {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.reveal-element[data-delay="1"] { transition-delay: 0.1s; }
.reveal-element[data-delay="2"] { transition-delay: 0.2s; }
.reveal-element[data-delay="3"] { transition-delay: 0.3s; }
.reveal-element[data-delay="4"] { transition-delay: 0.4s; }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all var(--t-spring);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn:active { transform: scale(0.95) !important; }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(255,255,255,0.15);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255,255,255,0.25);
  background: #f1f5f9;
}

.btn-ghost {
  color: var(--text);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover {
  background: var(--glass-bg-hv);
  border-color: var(--glass-border-hv);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glass);
}

.btn .fa-arrow-right { transition: transform var(--t-spring); }
.btn:hover .fa-arrow-right { transform: translateX(6px); }

/* ==================== SECTION SHARED ==================== */
.section { padding-block: var(--section-gap); position: relative; z-index: 1; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 1.5rem;
  padding: 0.4rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}
.section-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.section-heading {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
}

.section-heading em {
  font-style: normal;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  font-size: 1.15rem;
  color: var(--text-2);
  max-width: 540px;
  line-height: 1.8;
}

/* ==================== BACKGROUND MESH ==================== */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 10% 0%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(30, 58, 138, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 40% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

/* ==================== NAVBAR ==================== */
.navbar {
  position: fixed;
  top: 1rem; left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 3rem));
  height: 4.5rem;
  z-index: 1000;
  background: rgba(2, 2, 4, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  transition: all var(--t-base);
}

.navbar.scrolled {
  background: rgba(2, 2, 4, 0.7);
  box-shadow: var(--shadow-glass);
  border-color: rgba(255, 255, 255, 0.12);
  top: 0.5rem;
  width: min(1000px, calc(100% - 2rem));
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-inline: 1.5rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  z-index: 21;
}

.logo img {
  width: 2.2rem; height: 2.2rem;
  object-fit: contain;
  border-radius: 0.5rem;
  transition: transform var(--t-spring);
}
.logo:hover img { transform: scale(1.1) rotate(-5deg); }

.logo-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Nav links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: inline-flex;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--t-fast);
  position: relative;
}

.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link.active { color: var(--text); background: rgba(255, 255, 255, 0.1); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  width: 3rem; height: 3rem;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  z-index: 21;
}

.hamburger span {
  width: 1.25rem; height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all var(--t-base);
}

.hamburger.active span:nth-child(1) { transform: translateY(0.47rem) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-0.47rem) rotate(-45deg); }

/* ==================== HERO ==================== */
.hero {
  min-height: 100dvh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 1;
}

/* Split Layout for Hero */
.hero-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 3rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-heading {
  font-size: clamp(3.2rem, 5.5vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: hero-in 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

#typingTarget {
  white-space: nowrap;
}

.hero-greeting {
  display: block;
  font-size: 0.35em;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 0.5em;
  letter-spacing: 0.02em;
}

.hero-role {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 580px;
  opacity: 0;
  animation: hero-in 1s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}
.hero-role strong { color: var(--text); font-weight: 600; }

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
  opacity: 0;
  animation: hero-in 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

/* Hero Stats Glass Row */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 2.5rem;
  border-radius: var(--r-lg);
  opacity: 0;
  animation: hero-in 1s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-stat strong {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.hero-stat span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-stat-sep {
  width: 1px; height: 3rem;
  background: var(--glass-border);
}

/* Floating Visual in Hero Right */
.hero-visual {
  position: relative;
  width: 100%;
  height: 500px;
  perspective: 1000px;
  opacity: 0;
  animation: hero-in 1s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

.hero-visual-card {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotateY(-15deg) rotateX(10deg);
  width: 340px; height: 420px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-xl);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: float-3d 6s ease-in-out infinite alternate;
  transform-style: preserve-3d;
}

.hero-visual-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(139,92,246,0.3), transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}

.v-card-top {
  display: flex; justify-content: space-between; align-items: center;
  transform: translateZ(20px);
}
.v-card-top i { font-size: 2rem; color: var(--cyan); }
.v-card-badge {
  padding: 0.3rem 0.8rem;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
}

.v-card-body { transform: translateZ(40px); }
.v-card-body h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.v-card-body p { color: var(--text-2); font-size: 0.9rem; }

.v-card-bars {
  display: flex; flex-direction: column; gap: 0.5rem;
  transform: translateZ(30px);
}
.v-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.1); overflow: hidden; }
.v-bar-inner { height: 100%; background: var(--grad-main); width: 80%; }
.v-bar:nth-child(2) .v-bar-inner { width: 60%; background: var(--cyan); }

@keyframes float-3d {
  0% { transform: translate(-50%, -50%) rotateY(-15deg) rotateX(10deg) translateY(0); }
  100% { transform: translate(-50%, -50%) rotateY(-5deg) rotateX(5deg) translateY(-20px); }
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==================== ABOUT ==================== */
.about-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(4rem, 8vw, 8rem);
  align-items: center;
}

.about-text .lead {
  font-size: 1.35rem;
  color: var(--text);
  line-height: 1.6;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--cyan);
  margin-top: 1rem;
  transition: gap var(--t-spring);
}
.inline-link:hover { gap: 0.8rem; color: #fff; }

/* ==================== BENTO SKILLS ==================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1.25rem;
}

.bento-box {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

.bento-box:hover {
  transform: translateY(-5px);
  border-color: var(--glass-border-hv);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.bento-box:nth-child(1) { grid-column: span 2; }
.bento-box:nth-child(2) { grid-column: span 1; }
.bento-box:nth-child(3) { grid-column: span 1; }
.bento-box:nth-child(4) { grid-column: span 2; }

.bento-icon {
  width: 3.5rem; height: 3.5rem;
  background: var(--glass-bg-hv);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--accent-lt);
  margin-bottom: 1.5rem;
}

.bento-title {
  font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem;
}

.bento-list {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}

.bento-tag {
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-2);
  transition: all var(--t-fast);
}

.bento-tag:hover {
  background: var(--accent-dim);
  color: #fff;
  border-color: var(--accent);
}

/* Dynamic grid dimming using :has() (Modern CSS feature) */
.skills-grid:has(.bento-box:hover) .bento-box:not(:hover) {
  opacity: 0.6;
  transform: scale(0.98);
}

/* ==================== PROJECTS ==================== */
.projects-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: clamp(3rem, 6vw, 4rem);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  transition: all var(--t-spring);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: var(--glass-border-hv);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.project-image-wrap {
  width: 100%;
  aspect-ratio: 16/11;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  background: var(--bg-2);
}

.project-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-image-wrap img {
  transform: scale(1.08);
}

/* Glowing mask overlay */
.project-image-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg-2) 0%, transparent 50%);
  opacity: 0.5;
  pointer-events: none;
}

.project-overlay {
  position: absolute; inset: 0;
  background: rgba(2,2,4,0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity var(--t-base);
  z-index: 10;
}

.project-card:hover .project-overlay { opacity: 1; }

.project-action-btn {
  width: 3.5rem; height: 3.5rem;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transform: translateY(20px);
  transition: all var(--t-spring);
  opacity: 0;
}
.project-action-btn:nth-child(2) { transition-delay: 0.05s; }

.project-card:hover .project-action-btn {
  transform: translateY(0);
  opacity: 1;
}

.project-action-btn:hover {
  transform: scale(1.1) !important;
  background: var(--accent);
  color: #fff;
}

.project-info {
  padding: 1.5rem 0.5rem 0.5rem;
}

.project-info h3 {
  font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--text-2); font-size: 0.95rem; line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.project-tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.project-tags .tech-tag {
  font-size: 0.8rem; font-weight: 600; color: var(--text-acc);
  padding: 0.2rem 0;
}
.project-tags .tech-tag:not(:last-child)::after {
  content: '•'; margin-left: 0.5rem; color: var(--text-3);
}

.projects-grid:has(.project-card:hover) .project-card:not(:hover) {
  opacity: 0.5;
  transform: scale(0.96);
}

/* ---- Skeleton & Empty States ---- */
.projects-empty, .projects-error {
  grid-column: 1/-1;
  padding: 4rem; text-align: center;
  border: 1px dashed var(--glass-border);
  border-radius: var(--r-lg);
  color: var(--text-2);
}

.project-skeleton {
  border-radius: var(--r-lg);
  padding: 0.75rem;
}
.skel-img { aspect-ratio: 16/11; border-radius: var(--r-md); background: rgba(255,255,255,0.05); animation: pulse 2s infinite; }
.skel-body { padding: 1.5rem 0.5rem 0.5rem; }
.skel-line { height: 1rem; border-radius: 4px; background: rgba(255,255,255,0.05); margin-bottom: 0.5rem; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:0.5; } 50% { opacity:1; } }

/* ==================== CONTACT ==================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}

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

.contact-card {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.5rem;
  transition: transform var(--t-spring), background var(--t-fast);
}

.contact-card:hover {
  transform: translateX(10px);
  background: var(--glass-bg-hv);
  border-color: var(--glass-border-hv);
}

.contact-icon {
  width: 4rem; height: 4rem;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--text);
  transition: all var(--t-spring);
}
.contact-card:hover .contact-icon {
  background: var(--text); color: var(--bg); transform: scale(1.1);
}

.contact-info h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.contact-info p { color: var(--text-2); font-size: 0.95rem; }

/* ==================== FOOTER ==================== */
.footer {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-block: 3rem;
  margin-top: 4rem;
}

.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 2rem;
}

.footer-nav { display: flex; gap: 2rem; }
.footer-nav a { font-weight: 500; color: var(--text-2); transition: color var(--t-fast); }
.footer-nav a:hover { color: #fff; }

/* ==================== CURSOR SPOTLIGHT ==================== */
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,0.08) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: screen;
  transition: width 0.3s ease, height 0.3s ease;
  will-change: transform;
}

.cursor-glow.clicking {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(45,212,191,0.15) 0%, transparent 60%);
}

/* ==================== MODAL ==================== */
body.modal-open { overflow: hidden; }
.project-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(20px);
  animation: fade-in 0.3s ease;
}

.project-modal-dialog {
  width: min(900px, 100%); max-height: 90vh; overflow: auto;
  background: var(--bg); border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  animation: modal-up 0.5s cubic-bezier(0.16,1,0.3,1);
}

.modal-close-button {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: all var(--t-spring); z-index: 10;
}
.modal-close-button:hover { background: #fff; color: #000; transform: rotate(90deg) scale(1.1); }

@keyframes fade-in { from {opacity:0;} to {opacity:1;} }
@keyframes modal-up { from {opacity:0; transform:translateY(40px) scale(0.95);} to {opacity:1; transform:translateY(0) scale(1);} }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .hero-layout { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
  .hero-content { align-items: center; }
  .hero-role { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { height: 400px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-box:nth-child(1), .bento-box:nth-child(4) { grid-column: span 1; }
  .about-layout { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .navbar { width: calc(100% - 2rem); height: 4rem; }
  .nav-menu {
    position: absolute; top: calc(100% + 0.5rem); left: 0; width: 100%;
    flex-direction: column; background: var(--bg);
    border: 1px solid var(--glass-border); border-radius: var(--r-lg);
    padding: 1rem; opacity: 0; pointer-events: none;
    transform: translateY(-10px); transition: all var(--t-base);
  }
  .nav-menu.active { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .nav-link { width: 100%; text-align: center; }
  .hamburger { display: flex; }
  .projects-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .bento-box { grid-column: span 1 !important; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; justify-content: center; }
  .hero-stat-sep { display: none; }
  .hero-heading { font-size: clamp(2.5rem, 8vw, 3.2rem); }
  #typingTarget { white-space: normal; }
  .hero-visual-card { width: min(320px, 90vw); height: auto; min-height: 350px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .bg-orbs, .cursor-glow, .hero-visual { display: none; }
}

/* ==================== MODALS & LIGHTBOX ==================== */
.project-modal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(2, 2, 4, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; overflow-y: auto; opacity: 0;
  animation: modal-fade-in var(--t-base) forwards;
}
@keyframes modal-fade-in { to { opacity: 1; } }

.project-modal-dialog {
  background: var(--bg-2); width: 100%; max-width: 900px;
  border-radius: var(--r-xl); border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glass); position: relative;
  transform: translateY(40px) scale(0.95);
  animation: modal-slide-up var(--t-spring) 0.1s forwards; opacity: 0;
  display: flex; flex-direction: column; max-height: 90vh;
}
@keyframes modal-slide-up { to { opacity: 1; transform: translateY(0) scale(1); } }

.modal-close-button {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--glass-bg-hv); color: var(--text);
  font-size: 1.25rem; display: flex; align-items: center; justify-content: center;
  z-index: 10; border: 1px solid var(--glass-border); transition: all var(--t-fast);
}
.modal-close-button:hover { background: var(--accent); border-color: var(--accent); transform: scale(1.1) rotate(90deg); }

.project-modal-content { 
  padding: 3rem; 
  overflow-y: auto; 
}
.project-modal-content::-webkit-scrollbar { width: 6px; }
.project-modal-content::-webkit-scrollbar-track { background: transparent; }
.project-modal-content::-webkit-scrollbar-thumb { background: var(--glass-border-hv); border-radius: 3px; }

.project-modal-title { 
  font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.2; 
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.project-modal-description { 
  color: var(--text-2); font-size: 1.05rem; line-height: 1.8; margin-bottom: 2rem; 
}

.project-modal-tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem;
}
.project-modal-tags .tech-tag {
  padding: 0.4rem 1rem; background: rgba(255,255,255,0.05); 
  border: 1px solid var(--glass-border); border-radius: 999px; 
  font-size: 0.8rem; font-weight: 600; color: var(--text-acc);
}

.project-modal-actions { margin-bottom: 3rem; }
.project-visit-link {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0.8rem 1.5rem; background: var(--text); color: var(--bg);
  border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: all var(--t-fast);
}
.project-visit-link:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,255,255,0.2); }

.project-modal-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem;
}
.project-modal-image {
  display: block; width: 100%; padding: 0; margin: 0; background: none; border: none; cursor: zoom-in;
}
.project-modal-image img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  border-radius: var(--r-md); transition: transform var(--t-fast); border: 1px solid var(--glass-border);
}
.project-modal-image:hover img { transform: scale(1.02); border-color: var(--glass-border-hv); }

.project-lightbox {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center;
  opacity: 0; animation: modal-fade-in var(--t-fast) forwards;
}
.project-lightbox-dialog { position: relative; max-width: 95vw; max-height: 95vh; }
.project-lightbox-dialog img { max-width: 100%; max-height: 95vh; object-fit: contain; border-radius: var(--r-sm); box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.project-lightbox .modal-close-button { top: -3rem; right: -3rem; background: rgba(255,255,255,0.1); }
@media (max-width: 768px) { .project-lightbox .modal-close-button { top: 1rem; right: 1rem; } }
body.modal-open { overflow: hidden; }
