/* ===================================================
   PREMIUM AI ENGINEER PORTFOLIO — DESIGN SYSTEM
   =================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors */
  --bg-primary: #06080d;
  --bg-secondary: #0c0f17;
  --bg-surface: #111521;
  --bg-surface-hover: #171d2d;
  --bg-card: rgba(17, 21, 33, 0.6);
  --bg-card-hover: rgba(23, 29, 45, 0.8);

  --accent-primary: #10b981;
  --accent-primary-rgb: 16, 185, 129;
  --accent-secondary: #059669;
  --accent-secondary-rgb: 5, 150, 105;
  --accent-gradient: linear-gradient(135deg, #10b981, #059669);

  --text-primary: #f0f2f5;
  --text-secondary: #8b95a8;
  --text-tertiary: #5a6478;
  --text-accent: #10b981;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(16, 185, 129, 0.2);
  --border-accent-hover: rgba(16, 185, 129, 0.4);

  --glow-primary: 0 0 30px rgba(16, 185, 129, 0.15);
  --glow-secondary: 0 0 30px rgba(5, 150, 105, 0.15);

  /* Typography */
  --font-primary: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-padding: clamp(60px, 10vw, 120px);
  --container-width: 1200px;
  --container-padding: clamp(20px, 5vw, 40px);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
}

::selection {
  background: rgba(0, 212, 255, 0.25);
  color: var(--text-primary);
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-hover);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* --- Container --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Section --- */
.section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section--hidden {
  display: none;
}

/* --- Section Heading --- */
.section-heading {
  margin-bottom: 48px;
}

.section-heading__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 16px;
}

.section-heading__label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent-primary);
}

.section-heading__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.section-heading__subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 560px;
  line-height: 1.7;
}

/* ===================================================
   NAVBAR
   =================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition-base);
  background: transparent;
}

.navbar--scrolled {
  padding: 10px 0;
  background: rgba(6, 8, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.navbar__logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.navbar__logo span {
  color: var(--accent-primary);
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
}

.navbar__link:hover,
.navbar__link--active {
  color: var(--text-primary);
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: var(--transition-base);
  border-radius: var(--radius-full);
}

.navbar__link:hover::after,
.navbar__link--active::after {
  width: 100%;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.theme-toggle:hover {
  color: var(--accent-primary);
  border-color: var(--border-accent);
  background: rgba(0, 212, 255, 0.08);
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.theme-toggle__icon--moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme='light'] .theme-toggle__icon--sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme='light'] .theme-toggle__icon--moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.navbar__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.navbar__social-link:hover {
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.08);
}

.navbar__social-link svg {
  width: 18px;
  height: 18px;
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transition: var(--transition-base);
}

.navbar__hamburger--open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.navbar__hamburger--open span:nth-child(2) {
  opacity: 0;
}
.navbar__hamburger--open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
.navbar__mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 8, 13, 0.95);
  backdrop-filter: blur(30px);
  z-index: 999;
  padding-top: 80px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.navbar__mobile--open {
  display: flex;
}

.navbar__mobile a {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.navbar__mobile a:hover {
  color: var(--accent-primary);
}

/* ===================================================
   HERO
   =================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero__gradient-1 {
  position: absolute;
  top: -30%;
  right: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
  filter: blur(80px);
  animation: heroFloat 12s ease-in-out infinite;
}

.hero__gradient-2 {
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
  filter: blur(80px);
  animation: heroFloat 15s ease-in-out infinite reverse;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero__text {
  max-width: 600px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.2s;
}

.hero__eyebrow::before,
.hero__eyebrow::after {
  content: '•';
  font-size: 8px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.35s;
}

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

.hero__description {
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 520px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.5s;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.65s;
}

.hero__availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.8s;
}

.hero__availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* Hero Visual */
.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.5s;
}

/* ===================================================
   APPLE-STYLE TERMINAL
   =================================================== */
.terminal {
  width: 100%;
  max-width: 650px;
  border-radius: 12px;
  overflow: hidden;
  background: #1c1c1e;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 80px rgba(0, 212, 255, 0.06);
  font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Menlo', monospace;
  transform: perspective(800px) rotateY(-2deg) rotateX(1deg);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.terminal:hover {
  transform: perspective(800px) rotateY(0deg) rotateX(0deg);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 100px rgba(0, 212, 255, 0.1);
}

.terminal__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #2c2c2e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal__dots {
  display: flex;
  gap: 8px;
}

.terminal__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3a3a3c;
}

.terminal__dot--red {
  background: #ff5f57;
}

.terminal__dot--yellow {
  background: #febc2e;
}

.terminal__dot--green {
  background: #28c840;
}

.terminal__title {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.3px;
}

.terminal__body {
  padding: 24px 20px;
  min-height: 380px;
}

.terminal__line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  word-break: break-word;
}

.terminal__prompt {
  color: #28c840;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}

.terminal__path {
  color: #00d4ff;
  font-weight: 500;
  font-size: 14px;
  flex-shrink: 0;
}

.terminal__cmd {
  color: #f0f2f5;
  font-size: 14px;
  font-weight: 500;
  white-space: pre;
}

.terminal__cursor {
  color: #f0f2f5;
  font-weight: 600;
  font-size: 14px;
  opacity: 1;
}

.terminal__cursor--blink {
  animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.terminal__output {
  margin-top: 16px;
  margin-bottom: 8px;
}

.terminal__output-line {
  font-size: 14px;
  line-height: 1.8;
  color: #e0e0e0;
  opacity: 0;
  transform: translateY(4px);
  animation: termLineIn 0.3s ease forwards;
}

.terminal__output-line .terminal__label {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  margin-right: 4px;
}

.terminal__output-line .terminal__value {
  color: #f0f2f5;
  font-weight: 500;
}

.terminal__output-line .terminal__value--accent {
  color: #28c840;
  font-weight: 600;
}

@keyframes termLineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.terminal__line--final {
  margin-top: 4px;
  margin-bottom: 0;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent-gradient);
  color: #06080d;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
}

.btn--primary:hover {
  box-shadow: 0 6px 30px rgba(0, 212, 255, 0.35);
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-accent);
}

.btn--secondary:hover {
  border-color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.06);
  transform: translateY(-2px);
}

.btn--ghost {
  padding: 8px 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

.btn--ghost:hover {
  color: var(--accent-primary);
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ===================================================
   ABOUT
   =================================================== */
.about__content {
  display: flex;
  flex-direction: column;
  gap: 60px;
  align-items: stretch;
}

.about__text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: justify;
}

.about__text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about__journey {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.about__journey-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--bg-primary);
  background: var(--accent-gradient);
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  position: relative;
  min-width: 280px;
}

.journey-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 30px;
  bottom: -4px;
  width: 1px;
  height: 8px;
  background: var(--border-accent);
}

.journey-step__number {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 212, 255, 0.15);
  white-space: nowrap;
}

.journey-step__label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.journey-step__arrow {
  color: var(--text-tertiary);
  font-size: 12px;
}

/* ===================================================
   SKILLS
   =================================================== */
.skill-card {
  width: clamp(280px, 30vw, 340px);
  min-height: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--accent-gradient);
}


.skill-card:hover {
  border-color: var(--border-accent-hover);
  transform: translateY(-4px);
  box-shadow: var(--glow-primary);
}

.skill-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skill-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(0, 212, 255, 0.08);
  color: var(--accent-primary);
  font-size: 20px;
}

.skill-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.skill-card__body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ===================================================
   MARQUEE
   =================================================== */
.marquee {
  width: 100%;
  overflow: hidden;
  display: flex;
}

.marquee__content {
  display: flex;
  gap: 24px;
  padding: 8px 0 24px;
  animation: scrollMarquee 60s linear infinite;
  width: max-content;
}

.marquee__content--journey {
  gap: 12px;
  padding: 24px 0;
  animation-duration: 60s;
}

.marquee:hover .marquee__content {
  animation-play-state: paused;
}

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

/* ===================================================
   HORIZONTAL SCROLLER
   =================================================== */
.hscroller {
  position: relative;
}

.hscroller__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0 16px;
}

.hscroller__track::-webkit-scrollbar {
  display: none;
}

.hscroller__track > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}

.hscroller__controls {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.hscroller__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: var(--transition-fast);
  background: var(--bg-card);
}

.hscroller__btn:hover {
  color: var(--accent-primary);
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.hscroller__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.hscroller__btn svg {
  width: 18px;
  height: 18px;
}

/* ===================================================
   PROJECT CARDS
   =================================================== */
.project-card {
  width: clamp(320px, 40vw, 420px);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-accent-hover);
  transform: translateY(-4px);
  box-shadow: var(--glow-primary);
}

.project-card__image {
  position: relative;
  width: 100%;
  height: 200px;
  background: var(--bg-surface);
  overflow: hidden;
}

.project-card__image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-hover) 100%);
  font-family: var(--font-mono);
  font-size: 48px;
  color: var(--accent-primary);
  opacity: 0.3;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.project-card:hover .project-card__image img {
  transform: scale(1.05);
}

.project-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card__number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-primary);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.project-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tech-tag {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.12);
  color: var(--accent-primary);
}

.project-card__links {
  display: flex;
  gap: 12px;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.project-card__link:hover {
  color: var(--accent-primary);
  border-color: var(--border-accent);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
}

.project-card__link svg {
  width: 14px;
  height: 14px;
}

/* ===================================================
   PROJECT MODAL
   =================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(6, 8, 13, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}

.modal-overlay--open {
  display: flex;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin;
}

.modal__close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: var(--transition-fast);
  z-index: 10;
  cursor: pointer;
}

.modal__close:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.modal__content {
  padding: 48px;
  padding-top: 24px;
}

.modal__number {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-primary);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.modal__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.2;
}

.modal__section {
  margin-bottom: 32px;
}

.modal__section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal__section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.modal__section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal__section li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal__section li::before {
  content: '→';
  color: var(--accent-primary);
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 1px;
}

.modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.modal__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===================================================
   EDUCATION CARDS
   =================================================== */
.education-card {
  width: clamp(320px, 40vw, 400px);
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.education-card:hover {
  border-color: var(--border-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

.education-card__degree {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.education-card__field {
  font-size: 16px;
  color: var(--accent-primary);
  margin-bottom: 12px;
  font-weight: 500;
}

.education-card__institution {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.education-card__duration {
  font-size: 13px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.education-card__grade {
  font-size: 14px;
  color: var(--accent-secondary);
  margin-bottom: 16px;
  font-weight: 500;
}

.education-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.education-card__coursework {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.education-card__course-tag {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(167, 139, 250, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.12);
  color: var(--accent-secondary);
}

/* ===================================================
   CERTIFICATION CARDS
   =================================================== */
.cert-card {
  width: clamp(300px, 35vw, 360px);
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.cert-card:hover {
  border-color: var(--border-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

.cert-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cert-card__issuer {
  font-size: 14px;
  color: var(--accent-primary);
  margin-bottom: 4px;
  font-weight: 500;
}

.cert-card__date {
  font-size: 13px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.cert-card__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.cert-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  transition: var(--transition-fast);
}

.cert-card__link:hover {
  text-decoration: underline;
}

/* ===================================================
   EXPERIENCE TIMELINE
   =================================================== */
.exp-card {
  width: clamp(320px, 40vw, 420px);
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
}

.exp-card:hover {
  border-color: var(--border-accent-hover);
  transform: translateY(-4px);
  box-shadow: var(--glow-primary);
}

.exp-card__type {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.exp-card__role {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.exp-card__org {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.exp-card__date {
  font-size: 13px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.exp-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
}

.exp-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ===================================================
   PHILOSOPHY
   =================================================== */
.philosophy__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.philosophy__item {
  padding: 32px;
  border-left: 2px solid var(--border-accent);
  transition: var(--transition-base);
}

.philosophy__item:hover {
  border-left-color: var(--accent-primary);
}

.philosophy__number {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-primary);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.philosophy__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.philosophy__quote {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
}

/* ===================================================
   RESUME CTA
   =================================================== */
.resume-cta {
  text-align: center;
  padding: 80px 0;
}

.resume-cta__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin-bottom: 16px;
}

.resume-cta__desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.resume-cta__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===================================================
   CONTACT
   =================================================== */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact__info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
  color: var(--text-secondary);
}

.contact__info-item:hover {
  border-color: var(--border-accent);
  background: var(--bg-card);
}

.contact__info-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.contact__info-item span {
  font-size: 14px;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  padding: 14px 18px;
  font-size: 14px;
  font-family: var(--font-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-tertiary);
}

.form-error {
  font-size: 12px;
  color: #f87171;
  display: none;
}

.form-error--visible {
  display: block;
}

.form-status {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  display: none;
}

.form-status--success {
  display: block;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: #34d399;
}

.form-status--error {
  display: block;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: #f87171;
}

.form-status--loading {
  display: block;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.15);
  color: var(--accent-primary);
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

.footer__link {
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer__link:hover {
  color: var(--accent-primary);
}

.footer__socials {
  display: flex;
  gap: 16px;
}

.footer__social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer__social:hover {
  color: var(--accent-primary);
  border-color: var(--border-accent);
  background: rgba(0, 212, 255, 0.06);
}

.footer__social svg {
  width: 18px;
  height: 18px;
}

.footer__copyright {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer__tagline {
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
}

/* ===================================================
   SCROLL REVEAL
   =================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===================================================
   LIGHT THEME
   =================================================== */
[data-theme='light'] {
  --bg-primary: #f0f4f8;
  --bg-secondary: #ffffff;
  --bg-surface: #e2e8f0;
  --bg-surface-hover: #cbd5e1;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 1);

  --accent-primary: #059669;
  --accent-primary-rgb: 5, 150, 105;
  --accent-secondary: #047857;
  --accent-secondary-rgb: 4, 120, 87;
  --accent-gradient: linear-gradient(135deg, #059669, #047857);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-tertiary: #64748b;
  --text-accent: #059669;

  --border-subtle: rgba(15, 23, 42, 0.1);
  --border-accent: rgba(5, 150, 105, 0.3);
  --border-accent-hover: rgba(5, 150, 105, 0.5);

  --glow-primary: 0 8px 30px rgba(5, 150, 105, 0.15);
  --glow-secondary: 0 8px 30px rgba(4, 120, 87, 0.15);
}

[data-theme='light'] body {
  background-color: var(--bg-primary);
}

[data-theme='light'] ::selection {
  background: rgba(0, 119, 204, 0.2);
  color: var(--text-primary);
}

[data-theme='light'] .navbar--scrolled {
  background: rgba(248, 249, 252, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .hero__gradient-1 {
  background: radial-gradient(circle, rgba(0, 119, 204, 0.06) 0%, transparent 70%);
}

[data-theme='light'] .hero__gradient-2 {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
}

[data-theme='light'] .hero__grid {
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}

[data-theme='light'] .btn--primary {
  color: #ffffff;
}

[data-theme='light'] .btn--secondary {
  color: var(--text-primary);
}

[data-theme='light'] .terminal {
  background: #ffffff;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 0 80px rgba(0, 119, 204, 0.04);
}

[data-theme='light'] .terminal:hover {
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 0 100px rgba(0, 119, 204, 0.06);
}

[data-theme='light'] .terminal__titlebar {
  background: #f5f5f7;
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .terminal__title {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme='light'] .terminal__dot {
  background: #d1d1d6;
}

[data-theme='light'] .terminal__dot--red { background: #ff5f57; }
[data-theme='light'] .terminal__dot--yellow { background: #febc2e; }
[data-theme='light'] .terminal__dot--green { background: #28c840; }

[data-theme='light'] .terminal__body {
  background: #1c1c1e;
}

[data-theme='light'] .terminal__cmd,
[data-theme='light'] .terminal__cursor,
[data-theme='light'] .terminal__output-line .terminal__value {
  color: #f0f2f5;
}

[data-theme='light'] .project-card,
[data-theme='light'] .skill-card,
[data-theme='light'] .education-card,
[data-theme='light'] .cert-card,
[data-theme='light'] .journey-step {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

[data-theme='light'] .project-card__link {
  background: var(--bg-primary);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

[data-theme='light'] .project-card__link:hover {
  background: var(--bg-surface);
  color: var(--accent-primary);
  border-color: var(--border-accent);
}

[data-theme='light'] .project-card:hover,
[data-theme='light'] .skill-card:hover,
[data-theme='light'] .education-card:hover,
[data-theme='light'] .cert-card:hover {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 119, 204, 0.08);
  border-color: var(--border-accent);
}

[data-theme='light'] .navbar__mobile {
  background: rgba(248, 249, 252, 0.97);
}

[data-theme='light'] .navbar__hamburger span {
  background: var(--text-primary);
}

[data-theme='light'] .timeline__dot {
  background: var(--bg-primary);
}

[data-theme='light'] .modal {
  background: var(--bg-secondary);
}

[data-theme='light'] .modal-overlay {
  background: rgba(0, 0, 0, 0.4);
}

[data-theme='light'] .form-group input,
[data-theme='light'] .form-group textarea {
  background: var(--bg-surface);
  color: var(--text-primary);
}

[data-theme='light'] .form-group input::placeholder,
[data-theme='light'] .form-group textarea::placeholder {
  color: var(--text-tertiary);
}

[data-theme='light'] ::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

[data-theme='light'] ::-webkit-scrollbar-thumb {
  background: #d1d5db;
}

[data-theme='light'] ::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

[data-theme='light'] .theme-toggle {
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

[data-theme='light'] .theme-toggle:hover {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.06);
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 1024px) {
  .hero__content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero__visual {
    justify-content: center;
  }
  .terminal {
    max-width: 480px;
    transform: none;
  }
  .terminal:hover {
    transform: none;
  }
  .about__content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .philosophy__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .navbar__links {
    display: none;
  }
  .navbar__hamburger {
    display: flex;
  }
  .navbar__actions {
    display: none;
  }

  .hero__title {
    font-size: clamp(28px, 7vw, 42px);
  }

  .section {
    padding: clamp(40px, 8vw, 80px) 0;
  }

  .project-card, .education-card, .cert-card, .journey-step {
    width: min(85vw, 360px);
    min-width: unset;
  }

  .philosophy__grid {
    gap: 20px;
  }
  .philosophy__item {
    padding: 24px;
  }

  .modal {
    margin: 16px;
    border-radius: var(--radius-lg);
  }
  .modal__content {
    padding: 28px;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    justify-content: center;
  }
  .resume-cta__actions {
    flex-direction: column;
    align-items: center;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

