:root {
  --bg: #0f172a;
  --bg-soft: #111c31;
  --card: rgba(30, 41, 59, 0.78);
  --card-solid: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.18);
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.18);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --container: 1160px;
}

body.light-mode {
  --bg: #f8fafc;
  --bg-soft: #eef4fb;
  --card: rgba(255, 255, 255, 0.88);
  --card-solid: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: rgba(15, 23, 42, 0.12);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: Inter, sans-serif;
  line-height: 1.65;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 560px;
  height: 560px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.26),
    transparent 62%
  );
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: blur(70px);
  z-index: -1;
  opacity: 0.9;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 200;
}

.scroll-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.66);
  border-bottom: 1px solid var(--border);
}

body.light-mode .site-header {
  background: rgba(248, 250, 252, 0.78);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--text);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at center,
      rgba(59, 130, 246, 0.16),
      transparent 40%
    ),
    radial-gradient(
      circle at 30% 20%,
      rgba(59, 130, 246, 0.12),
      transparent 32%
    ),
    var(--bg-soft);
  z-index: -2;
  transition: transform 0.1s linear;
}

/* UPDATED: added left/right padding so hero content has breathing room */
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 36px;
  align-items: center;
  width: 100%;
  padding-left: 40px;
  padding-right: 40px;
}

.hero-copy {
  max-width: 760px;
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  margin: 0 0 20px;
}

.hero-text {
  color: var(--muted);
  max-width: 760px;
  font-size: 1.06rem;
}

.hero-panel .glass-card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(18px);
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  color: var(--accent);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.badge {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.hero-actions,
.project-buttons,
.case-actions,
.button-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-weight: 600;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 110px 0;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 42px;
}

.section-heading h2,
.case-block h2,
.case-hero h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0 0 14px;
}

.section-intro {
  color: var(--muted);
  max-width: 780px;
  font-size: 1.02rem;
}

.story-grid,
.cards-grid,
.project-gallery,
.skills-grid {
  display: grid;
  gap: 24px;
}

.story-grid,
.cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.story-card,
.info-card,
.project-card,
.skill-card,
.cta-card,
.case-block {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(14px);
}

.story-card h3,
.info-card h3,
.project-card h3,
.skill-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.featured-project {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 34px;
  align-items: start;
}

.featured-copy p {
  color: var(--muted);
}

.project-carousel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.carousel-track {
  position: relative;
  aspect-ratio: 16 / 10;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  cursor: pointer;
}

.carousel-slide.active {
  display: block;
}

.carousel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.carousel-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 42px;
  min-height: 42px;
  cursor: pointer;
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: var(--border);
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--accent);
}

.project-thumb-wrap {
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 16px;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.bullet-list {
  padding-left: 18px;
  color: var(--muted);
}

.bullet-list li + li {
  margin-top: 8px;
}

.mono-line,
.mono-inline {
  font-family: "JetBrains Mono", monospace;
  color: var(--muted);
}

.stars {
  color: var(--accent);
  letter-spacing: 0.08em;
  margin: 10px 0 12px;
  font-size: 1.05rem;
}

.timeline {
  border-left: 2px solid var(--border);
  padding-left: 24px;
  max-width: 760px;
}

.timeline-item + .timeline-item {
  margin-top: 32px;
}

.timeline-item h3 {
  margin: 0 0 8px;
}

.cta-section {
  padding-top: 80px;
  padding-bottom: 120px;
}

.cta-card {
  max-width: 820px;
}

.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
}

.form-note {
  color: var(--muted);
  margin-top: 14px;
}

.site-footer {
  padding: 28px 0 42px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 40px;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: min(1100px, 90vw);
  max-height: 84vh;
  border-radius: 16px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  min-width: 46px;
  min-height: 46px;
  border-radius: 999px;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.case-layout {
  display: grid;
  gap: 24px;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.case-gallery img {
  border-radius: 14px;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 1024px) {
  .hero-grid,
  .featured-project,
  .story-grid,
  .cards-grid,
  .project-gallery,
  .skills-grid,
  .case-gallery {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 70px;
  }

  .hero-grid {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-copy {
    max-width: 100%;
  }

  .nav {
    gap: 12px;
  }
}

@media (max-width: 720px) {
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0;
  }

  .nav {
    width: 100%;
  }

  .section {
    padding: 78px 0;
  }

  .cursor-glow {
    display: none;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
  }

  .lightbox {
    padding: 18px;
  }
}
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.social-links a {
  color: var(--muted);
  font-size: 0.95rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 10px 14px;
  border-radius: 999px;
  transition:
    transform 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.social-links a:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
}
