/* ============================================
   Portfolio — Kosuri Sreeram Chaitanya
   Dark-mode Design System & Responsive Styles
   ============================================ */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #0a0a0f;
  --bg-surface: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --accent: #4f8ff7;
  --accent-dark: #3a6fd8;
  --accent-glow: rgba(79, 143, 247, .2);
  --accent-glow-lg: rgba(79, 143, 247, .08);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(255, 255, 255, .06);
  --border-accent: rgba(79, 143, 247, .3);
  --gradient-accent: linear-gradient(135deg, #4f8ff7, #6c63ff);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, .4);
  --shadow-glow: 0 0 30px rgba(79, 143, 247, .15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: .3s cubic-bezier(.4, 0, .2, 1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: 1400px;
}

/* ---------- Section Utility ---------- */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.navbar.menu-open {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: transparent !important;
  border-bottom-color: transparent !important;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1001;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  padding: 10px 24px !important;
  background: var(--gradient-accent) !important;
  border-radius: var(--radius-xl) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  opacity: .9;
  transform: translateY(-1px);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 4px;
}

.nav-hamburger span {
  width: 26px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 4px;
  transition: var(--transition);
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

/* Animated gradient orb */
.hero-orb {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 143, 247, .18) 0%, transparent 70%);
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  animation: orbFloat 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-45%, -55%) scale(1.12);
  }
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 143, 247, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 143, 247, .03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
}

/* Hero exit: when .hero-visible is removed, fade out + slide down */
.hero:not(.hero-visible) .hero-badge,
.hero:not(.hero-visible) .hero-name,
.hero:not(.hero-visible) .hero-title,
.hero:not(.hero-visible) .hero-location,
.hero:not(.hero-visible) .hero-headline,
.hero:not(.hero-visible) .hero-buttons,
.hero:not(.hero-visible) .hero-scroll {
  opacity: 0 !important;
  transform: translateY(40px) !important;
  animation: none !important;
  transition: opacity .6s ease, transform .6s ease;
}

/* ---- Cinematic Hero Entrance ---- */
@keyframes heroDrop {
  0% {
    opacity: 0;
    transform: translateY(-40px) scale(.95);
    filter: blur(6px);
  }

  60% {
    opacity: 1;
    transform: translateY(6px) scale(1.01);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes heroSlideUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
    filter: blur(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes heroRevealLeft {
  0% {
    opacity: 0;
    transform: translateX(-60px) skewX(-3deg);
    filter: blur(10px);
  }

  70% {
    opacity: 1;
    transform: translateX(4px) skewX(0);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translateX(0) skewX(0);
    filter: blur(0);
  }
}

@keyframes heroScaleIn {
  0% {
    opacity: 0;
    transform: scale(.7);
    filter: blur(4px);
  }

  70% {
    opacity: 1;
    transform: scale(1.04);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes orbBreathe {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    opacity: .6;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.hero-orb {
  animation: orbBreathe 1.5s cubic-bezier(.22, 1, .36, 1) .05s both;
}

.hero-badge {
  opacity: 0;
  animation: heroDrop .9s cubic-bezier(.22, 1, .36, 1) .2s both;
}

.hero-name {
  opacity: 0;
  animation: heroRevealLeft 1s cubic-bezier(.22, 1, .36, 1) .35s both;
}

.hero-name .accent {
  background: linear-gradient(90deg, #4f8ff7 0%, #a78bfa 30%, #fff 50%, #a78bfa 70%, #4f8ff7 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear 1.8s infinite;
}

.hero-title {
  opacity: 0;
  animation: heroSlideUp .8s cubic-bezier(.22, 1, .36, 1) .55s both;
}

.hero-location {
  opacity: 0;
  animation: heroSlideUp .8s cubic-bezier(.22, 1, .36, 1) .7s both;
}

.hero-headline {
  opacity: 0;
  animation: heroSlideUp .8s cubic-bezier(.22, 1, .36, 1) .85s both;
}

.hero-buttons {
  opacity: 0;
  animation: heroScaleIn .8s cubic-bezier(.22, 1, .36, 1) 1s both;
}

.hero-content {
  max-width: 580px;
  position: relative;
  z-index: 2;
}

/* Hero two-column layout */
.hero-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* ---- Hero Profile Image ---- */
.hero-image {
  position: relative;
  flex-shrink: 0;
  width: 650px;
  height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  animation: heroImageReveal 1.2s cubic-bezier(.22, 1, .36, 1) .4s both;
  z-index: 1;
  border-bottom-right-radius: 120px;
}

/* Neon blue background glow */
.hero-image::before {
  content: '';
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(79, 143, 247, .25) 0%, rgba(30, 60, 120, .1) 50%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

/* Bottom fade & bottom-right feathering to blend into dark bg */
.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg-primary) 0%, rgba(10, 10, 15, 0.8) 15%, transparent 35%),
    radial-gradient(circle at 100% 100%, var(--bg-primary) 0%, rgba(10, 10, 15, 0.6) 20%, transparent 40%);
  border-bottom-right-radius: 120px;
  z-index: 2;
  pointer-events: none;
}

@keyframes heroImageReveal {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    filter: blur(15px);
  }

  60% {
    opacity: 1;
    transform: scale(1) translateY(-60px);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(-60px);
    filter: blur(0);
  }
}

.hero-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  filter: contrast(1.05) brightness(1.05);
  border-bottom-right-radius: 120px;
}

/* Hero image exit */
.hero:not(.hero-visible) .hero-image {
  opacity: 0 !important;
  transform: scale(.9) translateY(30px) !important;
  animation: none !important;
  transition: opacity .6s ease, transform .6s ease;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-flex {
    gap: 24px;
  }

  .hero-image {
    width: 380px;
    height: 460px;
  }

  .hero-content {
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .hero-flex {
    flex-direction: column-reverse;
    text-align: center;
    gap: 32px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    width: 320px;
    height: 400px;
  }
}

@media (max-width: 480px) {
  .hero-image {
    width: 260px;
    height: 320px;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  font-size: .82rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .4;
  }
}

.hero-name {
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 10px;
  letter-spacing: -2px;
}

.hero-name .accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  min-height: 1.8em;
}

.hero-title .cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 20px;
}

.hero-headline {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 560px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-xl);
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(79, 143, 247, .3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79, 143, 247, .4);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  opacity: 0;
  animation: heroFadeIn .8s cubic-bezier(.4, 0, .2, 1) 1.1s forwards;
  font-size: .75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

.hero-scroll .scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-size: 1.02rem;
}

.about-text .highlight {
  color: var(--accent);
  font-weight: 600;
}

.about-education {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.about-education h4 {
  font-size: .85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.about-education p {
  margin-bottom: 0;
  color: var(--text-primary);
  font-weight: 600;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: .85rem;
  color: var(--text-secondary);
}

/* ============ EXPERIENCE ============ */
.experience-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 4px;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.experience-role {
  font-size: 1.4rem;
  font-weight: 700;
}

.experience-company {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.05rem;
}

.experience-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  font-size: .82rem;
  font-weight: 500;
  color: var(--accent);
}

.experience-achievements {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.achievement {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.achievement-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 1rem;
}

.achievement p {
  color: var(--text-secondary);
  font-size: .98rem;
}

.achievement strong {
  color: var(--text-primary);
}

/* ============ SKILLS ============ */
#skills {
  position: relative;
  overflow: hidden;
}

#skills .container {
  max-width: 1600px;
}

#skills::before {
  content: '';
  position: absolute;
  top: 10%;
  right: -120px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(79, 143, 247, .08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: skillOrb 8s ease-in-out infinite alternate;
}

@keyframes skillOrb {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: .6;
  }

  100% {
    transform: translate(-30px, 40px) scale(1.15);
    opacity: 1;
  }
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.skill-category {
  flex: 1 1 0;
  min-width: 200px;
  padding: 32px 28px;
  background: rgba(26, 26, 46, .65);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all .4s cubic-bezier(.4, 0, .2, 1);
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1.5px;
  background: linear-gradient(135deg, transparent 30%, rgba(79, 143, 247, .4) 50%, rgba(108, 99, 255, .4) 70%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s ease;
}

.skill-category:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(79, 143, 247, .12), 0 0 60px rgba(79, 143, 247, .06);
  background: rgba(26, 26, 46, .85);
}

.skill-category:hover::before {
  opacity: 1;
}

.skill-category-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(79, 143, 247, .2), rgba(108, 99, 255, .15));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  color: var(--accent);
  font-size: 1.4rem;
  margin-bottom: 20px;
  position: relative;
  transition: var(--transition);
}

.skill-category:hover .skill-category-icon {
  box-shadow: 0 0 20px rgba(79, 143, 247, .3), 0 0 40px rgba(79, 143, 247, .1);
  transform: scale(1.05);
}

.skill-category h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -.3px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  padding: 9px 18px;
  background: rgba(18, 18, 26, .8);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-xl);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  cursor: default;
  position: relative;
}

.skill-tag:hover {
  border-color: var(--accent);
  color: #fff;
  background: linear-gradient(135deg, rgba(79, 143, 247, .15), rgba(108, 99, 255, .1));
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(79, 143, 247, .2), inset 0 0 0 1px rgba(79, 143, 247, .3);
}

/* ============ PROJECTS ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(79, 143, 247, .18), transparent 55%),
    radial-gradient(700px 300px at 90% 25%, rgba(108, 99, 255, .12), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0)),
    var(--bg-card);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .03) inset;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card), var(--shadow-glow), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}

.project-thumbnail {
  width: 100%;
  height: 160px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.project-thumbnail::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 10, 15, 0) 35%, rgba(10, 10, 15, .55) 100%);
  pointer-events: none;
  opacity: .75;
  z-index: 1;
}

.project-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  position: relative;
  z-index: 0;
  transform: scale(1.02);
  transition: transform .55s cubic-bezier(.4, 0, .2, 1), filter .55s cubic-bezier(.4, 0, .2, 1);
  filter: saturate(1.05) contrast(1.02);
}

.project-card:hover .project-thumb-img {
  transform: scale(1.07);
}

.project-thumbnail.thumb-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.project-thumbnail.thumb-missing::before {
  content: attr(data-fallback);
  position: relative;
  z-index: 2;
  padding: 10px 14px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .04);
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.project-card:focus-visible {
  outline: 3px solid rgba(79, 143, 247, .55);
  outline-offset: 4px;
}

.project-info {
  padding: 20px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(79, 143, 247, .14);
  border: 1px solid rgba(79, 143, 247, .28);
  color: var(--accent);
  border-radius: var(--radius-xl);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.project-info h3 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.project-info p {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.75;
}

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.contact-info>p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-item-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 1.05rem;
}

.contact-item-text span {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.contact-item-text a,
.contact-item-text p {
  font-size: .95rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.contact-item-text a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: var(--transition);
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(79, 143, 247, .2);
}

/* Contact Form */
.contact-form {
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: .95rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-submit {
  width: 100%;
  padding: 16px;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.form-submit:hover {
  opacity: .92;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(79, 143, 247, .3);
}

.form-success {
  display: none;
  text-align: center;
  padding: 24px;
  color: #22c55e;
  font-weight: 600;
  font-size: 1rem;
}

.form-success.show {
  display: block;
}

/* ============ FOOTER ============ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer p {
  color: var(--text-muted);
  font-size: .88rem;
}

.footer p .accent {
  color: var(--accent);
}

.back-to-top {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

/* ============ ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.4, 0, .2, 1), transform .7s cubic-bezier(.4, 0, .2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-children>* {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal-children.visible>* {
  opacity: 1;
  transform: translateY(0);
}

.reveal-children.visible>*:nth-child(1) {
  transition-delay: 0s;
  opacity: 1;
  transform: translateY(0);
}

.reveal-children.visible>*:nth-child(2) {
  transition-delay: .08s;
  opacity: 1;
  transform: translateY(0);
}

.reveal-children.visible>*:nth-child(3) {
  transition-delay: .16s;
  opacity: 1;
  transform: translateY(0);
}

.reveal-children.visible>*:nth-child(4) {
  transition-delay: .24s;
  opacity: 1;
  transform: translateY(0);
}

.reveal-children.visible>*:nth-child(5) {
  transition-delay: .32s;
  opacity: 1;
  transform: translateY(0);
}

.reveal-children.visible>*:nth-child(6) {
  transition-delay: .4s;
  opacity: 1;
  transform: translateY(0);
}

.reveal-children.visible>*:nth-child(7) {
  transition-delay: .48s;
  opacity: 1;
  transform: translateY(0);
}

.reveal-children.visible>*:nth-child(8) {
  transition-delay: .56s;
  opacity: 1;
  transform: translateY(0);
}

.reveal-children.visible>*:nth-child(9) {
  transition-delay: .64s;
  opacity: 1;
  transform: translateY(0);
}

/* ============ RESPONSIVE ============ */

/* Tablet */
@media (max-width: 1024px) {
  .hero-name {
    font-size: 3rem;
  }

  .about-grid {
    gap: 40px;
  }

  .contact-grid {
    gap: 32px;
  }

  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Small Tablet / Large Mobile */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, .97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .nav-hamburger {
    display: flex;
  }

  .hero-name {
    font-size: 2.6rem;
  }

  .hero-title {
    font-size: 1.15rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }

  .experience-card {
    padding: 28px;
  }

  .skill-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .skill-tags {
    justify-content: center;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .section {
    padding: 70px 0;
  }

  .container {
    padding: 0 16px;
  }

  .hero-name {
    font-size: 2rem;
    letter-spacing: -1px;
  }

  .hero-title {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    padding: 20px 16px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .experience-header {
    flex-direction: column;
  }

  .contact-form {
    padding: 24px;
  }

  .footer-content {
    justify-content: center;
  }
}
