/* =============================================
   PREM WADHWANI — PORTFOLIO
   Bold & Futuristic Dark Theme
   HTML5 + CSS3 Only
   ============================================= */

/* ===========================================
   1. CSS CUSTOM PROPERTIES
   =========================================== */
:root {
  /* Colors */
  --bg-primary: #07070f;
  --bg-secondary: #0c0c1d;
  --bg-tertiary: #10102a;
  --bg-card: rgba(14, 14, 36, 0.75);
  --bg-card-hover: rgba(20, 20, 50, 0.85);

  --accent-primary: #00e5ff;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #a855f7;
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --accent-gradient-reverse: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  --accent-glow: 0 0 20px rgba(0, 229, 255, 0.15);
  --accent-glow-strong: 0 0 30px rgba(0, 229, 255, 0.25);

  --text-primary: #eaeaf2;
  --text-secondary: #9a9ab8;
  --text-muted: #6a6a8a;

  --border-subtle: rgba(0, 229, 255, 0.08);
  --border-card: rgba(0, 229, 255, 0.12);
  --border-hover: rgba(0, 229, 255, 0.3);

  /* Typography */
  --font-heading: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Consolas', monospace;

  /* Spacing */
  --section-padding: 100px;
  --container-max: 1140px;
  --container-padding: 24px;
  --card-padding: 28px;
  --card-radius: 16px;
  --btn-radius: 10px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s ease;
  --transition-slow: 0.5s ease;

  /* Header */
  --header-height: 72px;
  --header-bg: rgba(7, 7, 15, 0.85);
}

/* ===========================================
   1.1 LIGHT THEME CUSTOM PROPERTIES
   Active when #theme-toggle is checked
   or [data-theme="light"] is set
   =========================================== */
:root:has(#theme-toggle:checked),
html:has(#theme-toggle:checked),
body:has(#theme-toggle:checked),
[data-theme="light"],
[data-theme="light"] body {
  /* Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;

  --accent-primary: #0284c7;        /* Crisp sapphire / sky blue */
  --accent-secondary: #7c3aed;      /* Deep vibrant violet */
  --accent-tertiary: #6366f1;       /* Indigo */
  --accent-gradient: linear-gradient(135deg, #0284c7, #7c3aed);
  --accent-gradient-reverse: linear-gradient(135deg, #7c3aed, #0284c7);
  --accent-glow: 0 4px 20px rgba(2, 132, 199, 0.12);
  --accent-glow-strong: 0 8px 30px rgba(2, 132, 199, 0.22);

  --text-primary: #0f172a;          /* Slate 900 */
  --text-secondary: #334155;        /* Slate 700 */
  --text-muted: #64748b;            /* Slate 500 */

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-card: rgba(15, 23, 42, 0.09);
  --border-hover: rgba(2, 132, 199, 0.4);

  --header-bg: rgba(248, 250, 252, 0.88);
}


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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);

  /* Subtle grid pattern */
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.018) 1px, transparent 1px);
  background-size: 60px 60px;
  background-attachment: fixed;
}

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

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-tertiary);
}

a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

ul {
  list-style: none;
}


/* ===========================================
   3. TYPOGRAPHY
   =========================================== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

p {
  color: var(--text-secondary);
  max-width: 65ch;
}


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

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


/* ===========================================
   5. SECTION TITLE
   =========================================== */
.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-primary);
  opacity: 0.7;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  max-width: 250px;
  background: var(--accent-gradient);
  opacity: 0.3;
}


/* ===========================================
   6. BUTTONS
   =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--btn-radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1.5px solid var(--border-hover);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--accent-primary);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}


/* ===========================================
   7. HEADER & NAVIGATION
   =========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.logo {
  margin-right: auto;
}

/* Logo */
.logo,
.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo:hover,
.footer-logo:hover {
  color: var(--text-primary);
}

.logo-dot {
  color: var(--accent-primary);
}

/* Nav toggle (hidden checkbox) */
.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Hamburger icon — hidden on desktop */
.nav-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 10;
  border-radius: 8px;
  transition: background var(--transition-fast);
}

.nav-toggle-label:hover {
  background: rgba(0, 229, 255, 0.06);
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* Nav links — desktop */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links li a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.nav-links li a:hover {
  color: var(--accent-primary);
  background: rgba(0, 229, 255, 0.06);
}

/* Resume nav button */
.nav-resume-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  color: var(--accent-primary) !important;
  border: 1px solid var(--border-hover);
  border-radius: 8px !important;
  padding: 8px 18px !important;
}

.nav-resume-btn:hover {
  background: rgba(0, 229, 255, 0.1) !important;
}


/* Theme toggle */
.theme-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

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

.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.theme-toggle-btn svg {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-btn:hover .icon-sun {
  transform: rotate(45deg);
}

.theme-toggle-btn:hover .icon-moon {
  transform: rotate(-20deg);
}

/* Dark mode: show sun icon, hide moon */
.icon-sun { display: block; }
.icon-moon { display: none; }

/* Light mode: show moon icon, hide sun */
body:has(#theme-toggle:checked) .icon-sun,
[data-theme="light"] .icon-sun { display: none; }

body:has(#theme-toggle:checked) .icon-moon,
[data-theme="light"] .icon-moon { display: block; }


/* ===========================================
   LIGHT MODE COMPONENT OVERRIDES
   =========================================== */
/* Subtle grid in light mode */
body:has(#theme-toggle:checked),
[data-theme="light"] body {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
}

/* Hero floating shapes in light mode */
body:has(#theme-toggle:checked) .hero-circle-1,
[data-theme="light"] .hero-circle-1 {
  background: radial-gradient(circle, rgba(2, 132, 199, 0.07), transparent 70%);
}

body:has(#theme-toggle:checked) .hero-circle-2,
[data-theme="light"] .hero-circle-2 {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.07), transparent 70%);
}

body:has(#theme-toggle:checked) .hero-circle-3,
[data-theme="light"] .hero-circle-3 {
  background: radial-gradient(circle, rgba(2, 132, 199, 0.1), transparent 70%);
}

body:has(#theme-toggle:checked) .photo-ring,
[data-theme="light"] .photo-ring {
  border-color: rgba(2, 132, 199, 0.25);
}

/* Light Mode Card Shadows & Tactile Elevation */
body:has(#theme-toggle:checked) .skill-card,
body:has(#theme-toggle:checked) .project-card,
body:has(#theme-toggle:checked) .timeline-content,
body:has(#theme-toggle:checked) .cert-card,
body:has(#theme-toggle:checked) .contact-form,
body:has(#theme-toggle:checked) .contact-method,
body:has(#theme-toggle:checked) .highlight-card,
body:has(#theme-toggle:checked) .back-to-top,
[data-theme="light"] .skill-card,
[data-theme="light"] .project-card,
[data-theme="light"] .timeline-content,
[data-theme="light"] .cert-card,
[data-theme="light"] .contact-form,
[data-theme="light"] .contact-method,
[data-theme="light"] .highlight-card,
[data-theme="light"] .back-to-top {
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
}

body:has(#theme-toggle:checked) .skill-card:hover,
body:has(#theme-toggle:checked) .project-card:hover,
body:has(#theme-toggle:checked) .timeline-content:hover,
body:has(#theme-toggle:checked) .cert-card:hover,
body:has(#theme-toggle:checked) .contact-method:hover,
body:has(#theme-toggle:checked) .highlight-card:hover,
body:has(#theme-toggle:checked) .back-to-top:hover,
[data-theme="light"] .skill-card:hover,
[data-theme="light"] .project-card:hover,
[data-theme="light"] .timeline-content:hover,
[data-theme="light"] .cert-card:hover,
[data-theme="light"] .contact-method:hover,
[data-theme="light"] .highlight-card:hover,
[data-theme="light"] .back-to-top:hover {
  box-shadow: 0 12px 32px rgba(2, 132, 199, 0.14);
}

/* Light Mode Java Code Card */
body:has(#theme-toggle:checked) .code-card,
[data-theme="light"] .code-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.08),
    0 4px 12px rgba(15, 23, 42, 0.04);
}

body:has(#theme-toggle:checked) .code-card:hover,
[data-theme="light"] .code-card:hover {
  border-color: rgba(2, 132, 199, 0.4);
  box-shadow:
    0 24px 55px rgba(2, 132, 199, 0.14),
    0 4px 16px rgba(15, 23, 42, 0.06);
}

body:has(#theme-toggle:checked) .code-card-header,
[data-theme="light"] .code-card-header {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

body:has(#theme-toggle:checked) .code-card-footer,
[data-theme="light"] .code-card-footer {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.06);
}

body:has(#theme-toggle:checked) .code-title,
[data-theme="light"] .code-title {
  color: #334155;
}

body:has(#theme-toggle:checked) .code-keyword,
[data-theme="light"] .code-keyword {
  color: #7c3aed;
}

body:has(#theme-toggle:checked) .code-class,
[data-theme="light"] .code-class {
  color: #0284c7;
}

body:has(#theme-toggle:checked) .code-string,
[data-theme="light"] .code-string {
  color: #16a34a;
}

body:has(#theme-toggle:checked) .code-func,
[data-theme="light"] .code-func {
  color: #d97706;
}

body:has(#theme-toggle:checked) .code-badge,
[data-theme="light"] .code-badge {
  background: rgba(15, 23, 42, 0.04);
  color: #64748b;
}

body:has(#theme-toggle:checked) .line-num,
[data-theme="light"] .line-num {
  color: rgba(100, 116, 139, 0.45);
}

/* Skill Tags & Tech Badges in Light Mode */
body:has(#theme-toggle:checked) .skill-tag,
[data-theme="light"] .skill-tag {
  background: rgba(15, 23, 42, 0.04);
  color: #334155;
  border-color: rgba(15, 23, 42, 0.08);
}

body:has(#theme-toggle:checked) .skill-tag:hover,
[data-theme="light"] .skill-tag:hover {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.3);
}

body:has(#theme-toggle:checked) .skill-tag.highlight,
[data-theme="light"] .skill-tag.highlight {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
  border-color: rgba(2, 132, 199, 0.25);
}

body:has(#theme-toggle:checked) .tech-tag,
[data-theme="light"] .tech-tag {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.22);
  color: #0284c7;
}

body:has(#theme-toggle:checked) .timeline-date,
[data-theme="light"] .timeline-date {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
}

body:has(#theme-toggle:checked) .timeline-marker,
[data-theme="light"] .timeline-marker {
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.25);
}

body:has(#theme-toggle:checked) .highlight-icon,
[data-theme="light"] .highlight-icon {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
}

body:has(#theme-toggle:checked) .cert-icon,
[data-theme="light"] .cert-icon {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.22);
  color: #7c3aed;
}

body:has(#theme-toggle:checked) .contact-method-icon,
[data-theme="light"] .contact-method-icon {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
}

/* Contact Form Controls in Light Mode */
body:has(#theme-toggle:checked) .form-group input,
body:has(#theme-toggle:checked) .form-group textarea,
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

body:has(#theme-toggle:checked) .form-group input:focus,
body:has(#theme-toggle:checked) .form-group textarea:focus,
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group textarea:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

body:has(#theme-toggle:checked) .form-group input::placeholder,
body:has(#theme-toggle:checked) .form-group textarea::placeholder,
[data-theme="light"] .form-group input::placeholder,
[data-theme="light"] .form-group textarea::placeholder {
  color: #94a3b8;
}

/* Primary Button Shadow in Light Mode */
body:has(#theme-toggle:checked) .btn-primary,
[data-theme="light"] .btn-primary {
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.28);
}

body:has(#theme-toggle:checked) .btn-primary:hover,
[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 6px 26px rgba(2, 132, 199, 0.38);
}

/* Navigation Links in Light Mode */
body:has(#theme-toggle:checked) .nav-links li a:hover,
[data-theme="light"] .nav-links li a:hover {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
}

body:has(#theme-toggle:checked) .nav-resume-btn:hover,
[data-theme="light"] .nav-resume-btn:hover {
  background: rgba(2, 132, 199, 0.1) !important;
}

body:has(#theme-toggle:checked) .theme-toggle-btn:hover,
[data-theme="light"] .theme-toggle-btn:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.3);
  color: #0284c7;
}


/* ===========================================
   8. HERO SECTION
   =========================================== */
.hero {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 60px 0;
}

/* Decorative floating shapes */
.hero-decoration {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-circle-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.05), transparent 70%);
  top: -10%;
  right: -10%;
  animation: float-slow 14s ease-in-out infinite;
}

.hero-circle-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.05), transparent 70%);
  bottom: 10%;
  left: -5%;
  animation: float-slow 12s ease-in-out infinite reverse;
}

.hero-circle-3 {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.06), transparent 70%);
  top: 30%;
  right: 20%;
  animation: pulse-glow 6s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--accent-primary);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.greeting-line {
  display: inline-block;
  width: 30px;
  height: 1.5px;
  background: var(--accent-primary);
  opacity: 0.6;
}

.hero-name {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  letter-spacing: -1.5px;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.typed-prefix {
  color: var(--accent-primary);
  opacity: 0.7;
}

.hero-separator {
  color: var(--accent-secondary);
  font-size: 0.6em;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 48px;
}

/* Hero social links */
.hero-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: all var(--transition-base);
}

.hero-social a:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: var(--accent-glow);
  transform: translateY(-3px);
}


/* ===========================================
   8.1 SLEEK JAVA CODE CARD / TERMINAL
   =========================================== */
.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-code-wrapper {
  display: flex;
  justify-content: center;
  position: relative;
}

.code-card {
  width: 100%;
  max-width: 500px;
  background: rgba(11, 11, 28, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.16);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.45),
    0 0 35px rgba(0, 229, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.code-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow:
    0 25px 55px rgba(0, 0, 0, 0.55),
    0 0 45px rgba(0, 229, 255, 0.16);
}

.code-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  background: rgba(7, 7, 18, 0.85);
  border-bottom: 1px solid rgba(0, 229, 255, 0.1);
}

.code-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.code-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.code-java-icon {
  color: var(--accent-primary);
}

.code-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse-glow 2s infinite;
}

.code-body {
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.68;
  overflow-x: auto;
}

.code-body pre {
  margin: 0;
  font-family: inherit;
}

.code-body code {
  font-family: inherit;
  display: block;
}

.line-num {
  display: inline-block;
  width: 26px;
  color: rgba(148, 163, 184, 0.35);
  user-select: none;
  font-size: 0.76rem;
}

.code-keyword {
  color: #c084fc;
  font-weight: 500;
}

.code-class {
  color: #38bdf8;
  font-weight: 600;
}

.code-string {
  color: #4ade80;
}

.code-func {
  color: #fbbf24;
}

.code-comment {
  color: #64748b;
  font-style: italic;
}

.code-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: var(--accent-primary);
  vertical-align: middle;
  margin-left: 2px;
  animation: pulse-glow 1s infinite alternate;
}

.code-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(7, 7, 18, 0.65);
  border-top: 1px solid rgba(0, 229, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.code-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.04);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}


/* ===========================================
   9. ABOUT SECTION
   =========================================== */
.about {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 60px;
  align-items: start;
}

/* Profile photo */
.about-photo-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-photo {
  position: relative;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gradient);
  z-index: 2;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(2.4);
  transform-origin: 50% 16%;
  position: relative;
  z-index: 2;
  transition: transform var(--transition-base);
}

.profile-photo:hover img {
  transform: scale(2.55);
}

.profile-initials {
  position: absolute;
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  z-index: 1;
  user-select: none;
}

.photo-ring {
  position: absolute;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  border: 1.5px dashed rgba(0, 229, 255, 0.15);
  animation: spin-slow 25s linear infinite;
  z-index: 1;
}

/* About content */
.about-lead {
  font-size: 1.12rem;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-content p {
  margin-bottom: 12px;
}

/* Highlight cards */
.about-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.highlight-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  transition: all var(--transition-base);
}

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

.highlight-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: rgba(0, 229, 255, 0.06);
  border-radius: 10px;
  color: var(--accent-primary);
}

.highlight-card div {
  display: flex;
  flex-direction: column;
}

.highlight-card strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.highlight-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
}


/* ===========================================
   10. SKILLS SECTION
   =========================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-card {
  padding: var(--card-padding);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  transition: all var(--transition-base);
}

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

.skill-card.card-wide {
  grid-column: 1 / -1;
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--accent-primary);
}

.skill-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  display: inline-block;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  color: var(--accent-primary);
  border-color: var(--border-hover);
  background: rgba(0, 229, 255, 0.08);
}

.skill-tag.highlight {
  color: var(--accent-primary);
  border-color: rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.06);
}


/* ===========================================
   11. PROJECTS SECTION
   =========================================== */
.projects {
  background: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: all var(--transition-base);
}

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

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--card-padding);
  background: var(--accent-gradient);
}

.project-type {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-number {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
}

.project-card-body {
  padding: var(--card-padding);
  flex: 1;
}

.project-title {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.project-description {
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.7;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  display: inline-block;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--accent-primary);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 6px;
}

.project-card-footer {
  padding: 16px var(--card-padding) 24px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.project-link:hover {
  color: var(--accent-primary);
  transform: translateX(4px);
}


/* ===========================================
   12. EDUCATION SECTION
   =========================================== */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-gradient);
  opacity: 0.3;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 40px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -36px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

.timeline-content {
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  transition: all var(--transition-base);
}

.timeline-content:hover {
  border-color: var(--border-hover);
  box-shadow: var(--accent-glow);
}

.timeline-date {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-primary);
  padding: 4px 14px;
  background: rgba(0, 229, 255, 0.06);
  border-radius: 6px;
  margin-bottom: 14px;
}

.timeline-content h3 {
  margin-bottom: 6px;
}

.timeline-institution {
  font-size: 0.92rem;
  color: var(--accent-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

.timeline-details {
  font-size: 0.9rem;
  line-height: 1.7;
}


/* ===========================================
   13. CERTIFICATIONS SECTION
   =========================================== */
.certifications {
  background: var(--bg-secondary);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.cert-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: var(--card-padding);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  transition: all var(--transition-base);
}

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

.cert-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 14px;
  color: var(--accent-secondary);
}

.cert-card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.cert-issuer {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}


/* ===========================================
   14. CONTACT SECTION
   =========================================== */
.contact-intro {
  text-align: center;
  margin: -20px auto 48px;
  max-width: 520px;
  font-size: 1.05rem;
}

.contact .section-title {
  justify-content: center;
}

.contact .section-title::after {
  display: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* Contact form */
.contact-form {
  padding: var(--card-padding);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: all var(--transition-fast);
  resize: vertical;
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.08);
  background: rgba(0, 229, 255, 0.05);
}

.form-note {
  margin-top: 14px;
  text-align: center;
}

.form-note small {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Contact info */
.contact-info h3 {
  font-size: 1.15rem;
  margin-bottom: 24px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  transition: all var(--transition-base);
}

.contact-method:hover {
  border-color: var(--border-hover);
  box-shadow: var(--accent-glow);
  transform: translateX(4px);
}

.contact-method-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: rgba(0, 229, 255, 0.06);
  border-radius: 10px;
  color: var(--accent-primary);
}

.contact-method div {
  display: flex;
  flex-direction: column;
}

.contact-method strong {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-method span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.contact-cta {
  padding-top: 12px;
}

.contact-cta p {
  font-size: 0.88rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}


/* ===========================================
   15. FOOTER
   =========================================== */
.site-footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-primary);
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 30px;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.footer-links h4,
.footer-social h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

/* Social links */
.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: all var(--transition-base);
}

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

.footer-bottom {
  text-align: center;
  grid-column: 1 / -1;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: none;
}


/* ===========================================
   16. BACK TO TOP
   =========================================== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: var(--bg-card);
  color: var(--accent-primary);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--transition-base);
  opacity: 0.7;
}

.back-to-top:hover {
  opacity: 1;
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: var(--accent-glow-strong);
  transform: translateY(-3px);
}


/* ===========================================
   17. ANIMATIONS
   =========================================== */
@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-25px) rotate(3deg); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.3); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* ===========================================
   18. MEDIA QUERIES
   =========================================== */

/* Tablet & Below — max 1024px */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-grid {
    gap: 40px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .skill-card.card-wide {
    grid-column: auto;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .certs-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}


/* Tablet Portrait — max 768px */
@media (max-width: 768px) {
  :root {
    --section-padding: 64px;
    --container-padding: 20px;
    --card-padding: 22px;
    --header-height: 64px;
  }

  /* Mobile Navigation */
  .theme-toggle-btn {
    order: 2;
  }

  .nav-toggle-label {
    order: 3;
    display: flex;
  }

  #main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
  }

  .nav-toggle:checked ~ #main-nav {
    max-height: 500px;
  }

  /* Hamburger animation */
  .nav-toggle:checked ~ .nav-toggle-label .hamburger {
    background: transparent;
  }

  .nav-toggle:checked ~ .nav-toggle-label .hamburger::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle:checked ~ .nav-toggle-label .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .nav-links {
    flex-direction: column;
    padding: 16px var(--container-padding) 24px;
    gap: 4px;
  }

  .nav-links li a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
  }

  .nav-links li a:hover {
    background: rgba(0, 229, 255, 0.08);
  }

  body:has(#theme-toggle:checked) .nav-links li a:hover,
  [data-theme="light"] .nav-links li a:hover {
    background: rgba(2, 132, 199, 0.08);
  }

  .nav-resume-btn {
    margin-top: 8px;
    text-align: center;
    justify-content: center;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .about-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .about-lead {
    text-align: left;
  }

  .about-content p:not(.about-lead) {
    text-align: left;
  }

  .profile-photo {
    width: 200px;
    height: 200px;
  }

  .photo-ring {
    width: 230px;
    height: 230px;
  }

  .profile-initials {
    font-size: 3rem;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: 60px 0 80px;
  }

  .hero-cta {
    flex-direction: column;
    gap: 12px;
  }

  .hero-cta .btn {
    text-align: center;
    justify-content: center;
  }

  /* Footer */
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .social-links {
    justify-content: center;
  }

  .footer-links ul {
    align-items: center;
  }

  /* Section title */
  .section-title::after {
    max-width: 100px;
  }
}


/* Mobile — max 480px */
@media (max-width: 480px) {
  :root {
    --section-padding: 52px;
    --card-padding: 18px;
    --card-radius: 12px;
  }

  .hero-greeting {
    font-size: 0.85rem;
  }

  .hero-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .hero-separator {
    display: none;
  }

  .hero-tagline {
    font-size: 0.95rem;
  }

  .hero-social {
    gap: 10px;
  }

  .code-body {
    font-size: 0.72rem;
    padding: 14px 14px;
    line-height: 1.55;
  }

  .line-num {
    width: 20px;
  }

  .code-card-header {
    padding: 10px 14px;
  }

  .code-card-footer {
    padding: 8px 14px;
    font-size: 0.68rem;
  }

  .hero-social a {
    width: 38px;
    height: 38px;
  }

  .btn {
    padding: 12px 22px;
    font-size: 0.85rem;
  }

  .project-card-header {
    padding: 14px var(--card-padding);
  }

  .timeline {
    padding-left: 30px;
  }

  .timeline-marker {
    left: -26px;
    width: 14px;
    height: 14px;
    border-width: 2.5px;
  }

  .cert-card {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .contact-method {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .contact-cta .btn {
    font-size: 0.78rem;
    word-break: break-all;
  }

  .highlight-card {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
    border-radius: 10px;
  }
}


/* ===========================================
   19. ACCESSIBILITY & REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast focus for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* Skip to content (visible on focus) */
.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
