/*
 * Modern Portfolio Design System - 2026
 * Clean, minimal, and sophisticated
 * Apple Human Interface Guidelines inspired
 */

/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url("fonts.css");
@import url("fontello/css/fontello.css");
@import url("font-awesome/css/font-awesome.min.css");

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

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Colors - Dark Theme (Default) */
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #18181b;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --accent: #e4e4e7;
  --accent-secondary: #a1a1aa;
  --accent-gradient: linear-gradient(135deg, #fafafa 0%, #d4d4d8 50%, #a1a1aa 100%);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  --glass-bg: rgba(17, 17, 19, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Typography - Apple HIG inspired */
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', ui-monospace, monospace;

  /* Apple-style type scale */
  --text-xs: 0.8125rem;    /* 13px - caption */
  --text-sm: 0.9375rem;    /* 15px - footnote */
  --text-base: 1.0625rem;  /* 17px - body (Apple standard) */
  --text-lg: 1.1875rem;    /* 19px - callout */
  --text-xl: 1.375rem;     /* 22px - title 3 */
  --text-2xl: 1.6875rem;   /* 27px - title 2 */
  --text-3xl: 2.125rem;    /* 34px - title 1 */
  --text-4xl: 2.75rem;     /* 44px - large title */
  --text-5xl: 3.5rem;      /* 56px - display */

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Container */
  --container-max: 1100px;
  --container-padding: var(--space-xl);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.15);

  /* Aurora Colors - Dark Theme (monochromatic) */
  --aurora-1: rgba(255, 255, 255, 0.08);
  --aurora-2: rgba(200, 200, 200, 0.06);
  --aurora-3: rgba(160, 160, 160, 0.05);
  --aurora-4: rgba(120, 120, 120, 0.04);
}


/* ===== BASE STYLES ===== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans) !important;
  font-size: var(--text-base);
  line-height: 1.47;  /* Apple standard */
  color: var(--text-primary) !important;
  background: var(--bg-primary) !important;
  transition: background-color var(--transition-base), color var(--transition-base);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

/* ===== AURORA BACKGROUND ANIMATION ===== */
body::before,
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
}

/* Aurora Layer 1 - Primary flowing waves */
body::before {
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, var(--aurora-1), transparent 50%),
    radial-gradient(ellipse 70% 50% at 90% 80%, var(--aurora-2), transparent 50%),
    radial-gradient(ellipse 60% 80% at 50% 50%, var(--aurora-3), transparent 60%);
  animation: aurora-drift 20s ease-in-out infinite alternate;
  filter: blur(40px);
}

/* Aurora Layer 2 - Secondary accent waves */
body::after {
  background:
    radial-gradient(ellipse 50% 40% at 80% 20%, var(--aurora-4), transparent 50%),
    radial-gradient(ellipse 60% 50% at 20% 70%, var(--aurora-2), transparent 50%),
    radial-gradient(ellipse 40% 60% at 60% 90%, var(--aurora-1), transparent 60%);
  animation: aurora-drift-reverse 25s ease-in-out infinite alternate;
  filter: blur(60px);
  opacity: 0.7;
}

@keyframes aurora-drift {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.8;
  }
  25% {
    transform: translate(5%, 3%) rotate(1deg) scale(1.02);
    opacity: 1;
  }
  50% {
    transform: translate(-3%, 5%) rotate(-1deg) scale(0.98);
    opacity: 0.9;
  }
  75% {
    transform: translate(2%, -3%) rotate(0.5deg) scale(1.01);
    opacity: 1;
  }
  100% {
    transform: translate(-5%, 2%) rotate(-0.5deg) scale(1);
    opacity: 0.85;
  }
}

@keyframes aurora-drift-reverse {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translate(-4%, 2%) rotate(-1deg) scale(1.03);
    opacity: 0.8;
  }
  50% {
    transform: translate(4%, -4%) rotate(1deg) scale(0.97);
    opacity: 0.7;
  }
  75% {
    transform: translate(-2%, 4%) rotate(-0.5deg) scale(1.02);
    opacity: 0.9;
  }
  100% {
    transform: translate(3%, -2%) rotate(0.5deg) scale(1);
    opacity: 0.65;
  }
}

/* ===== TYPOGRAPHY - Apple HIG ===== */
h1 {
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.022em;
  color: var(--text-primary);
}

h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h4, h5, h6 {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

p {
  font-size: var(--text-base);
  line-height: 1.47;
  color: var(--text-secondary);
}

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

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

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ===== SECTION TITLES ===== */
.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.section-subtitle {
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: var(--space-3xl);
}

/* ===== BUTTONS ===== */
.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  height: 50px;
  padding: 0 24px;
  min-width: 160px;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  border: 2px solid var(--accent);
  box-sizing: border-box;
}

.button {
  color: #fff !important;
  background: #27272a !important;
  border-color: #3f3f46 !important;
}

.button:hover {
  background: #3f3f46 !important;
  border-color: #52525b !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: #fff !important;
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button-secondary {
  color: #fafafa !important;
  background: transparent !important;
  border-color: #3f3f46 !important;
}

.button-secondary:hover {
  background: #27272a !important;
  border-color: #52525b !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* ===== NAVIGATION ===== */
#nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) var(--space-xl);
  background: transparent;
  transition: all var(--transition-base);
}

#nav-wrap.opaque {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

ul#nav {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  list-style: none;
}

ul#nav li { height: auto; }

ul#nav li a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  letter-spacing: 0;
}

ul#nav li a:hover,
ul#nav li.current a {
  color: var(--text-primary) !important;
  background: var(--bg-card);
}

/* ===== HAMBURGER MENU ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1002;
  position: relative;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
}

/* Hamburger to X animation */
#nav-wrap.menu-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#nav-wrap.menu-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#nav-wrap.menu-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav overlay for mobile */
.nav-overlay {
  display: none;
}

/* ===== HEADER / HERO ===== */
header {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image: url('/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  padding: var(--space-5xl) var(--container-padding);
}

/* Dark overlay for text readability over wallpaper */
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 11, 0.4) 0%,
    rgba(10, 10, 11, 0.5) 50%,
    rgba(10, 10, 11, 0.7) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0;
  max-width: 720px;
  margin: 0 auto;
}

.hero-greeting {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: var(--space-md);
  letter-spacing: 0.02em;
  opacity: 0.9;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: var(--space-xl);
  color: var(--text-primary);
  background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-3xl);
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-description .highlight {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-3xl);
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 1.25rem;
  color: var(--text-muted) !important;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.hero-social a:hover {
  color: var(--text-primary) !important;
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: var(--space-3xl);
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator a {
  display: flex;
  color: var(--text-muted) !important;
  opacity: 0.6;
  animation: gentleBounce 2.5s ease-in-out infinite;
  transition: opacity var(--transition-base);
}

.scroll-indicator a:hover {
  opacity: 1;
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ===== ABOUT SECTION ===== */
#about {
  background: var(--bg-secondary) !important;
  padding: var(--space-5xl) var(--container-padding);
}

.about-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4xl);
  align-items: start;
}

.about-image {
  position: sticky;
  top: calc(var(--space-4xl) + 80px);
}

.about-image .profile-pic {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.about-image .profile-pic:hover {
  border-color: var(--border-hover);
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.about-text h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.about-text > p {
  font-size: var(--text-lg);
  line-height: 1.6;
  margin-bottom: var(--space-3xl);
  color: var(--text-secondary);
}

.about-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xl);
  align-items: flex-start;
}

.contact-info h3 {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.contact-info p {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-secondary);
}

.contact-info a {
  color: var(--accent);
  transition: color var(--transition-fast);
}

.contact-info a:hover {
  color: var(--accent-secondary);
}

/* ===== PORTFOLIO SECTION ===== */
#portfolio {
  background: var(--bg-primary) !important;
  padding: var(--space-5xl) var(--container-padding);
}

.portfolio-content {
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  text-align: left;
}

.portfolio-card {
  position: relative;
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  text-decoration: none;
}

.portfolio-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.portfolio-card .card-image {
  overflow: hidden;
  aspect-ratio: 16/10;
}

.portfolio-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.portfolio-card:hover .card-image img {
  transform: scale(1.05);
}

.portfolio-card .card-content {
  padding: var(--space-lg);
}

.portfolio-card .card-content h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.portfolio-card .card-content p {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.portfolio-card .card-arrow {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  opacity: 0;
  transform: translate(-8px, 8px);
  transition: all var(--transition-base);
}

.portfolio-card:hover .card-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* ===== RESUME SECTION ===== */
#resume {
  background: var(--bg-secondary) !important;
  padding: var(--space-5xl) var(--container-padding);
}

.resume-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-4xl);
}

.resume-section .section-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-2xl);
}

.timeline {
  position: relative;
  padding-left: var(--space-3xl);
}

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

.timeline-item {
  position: relative;
  padding-bottom: var(--space-2xl);
}

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

.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--space-xl) - 18px);
  top: 4px;
  width: 36px;
  height: 36px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 3px var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.timeline-marker .company-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.timeline-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-sm);
}

.timeline-meta .company {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.timeline-meta .date {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.timeline-content > p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
}


/* ===== BOOKS SECTION ===== */
#books {
  background: var(--bg-primary);
  padding: var(--space-5xl) var(--container-padding);
}

.books-content {
  max-width: var(--container-max);
  margin: 0 auto;
  text-align: center;
}

.books-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  text-align: left;
}

.book-card {
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  position: relative;
}

.book-card:hover {
  border-color: var(--border-hover);
}

.book-card__cover {
  flex-shrink: 0;
  width: 100px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.book-card:hover .book-card__cover img {
  transform: scale(1.03);
}

.book-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.book-card__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.book-card__title-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.book-card__title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.book-card__author {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 400;
}

.book-card__summary {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.book-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.6;
}

.book-badge--finished {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.book-badge--reading {
  color: #a3e635;
  background: rgba(163, 230, 53, 0.1);
  border: 1px solid rgba(163, 230, 53, 0.2);
}

.book-badge--up-next {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
}

.book-card__thoughts {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
  font-style: italic;
}

.book-card__link {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: all var(--transition-base);
}

.book-card:hover .book-card__link {
  opacity: 1;
  transform: translate(0, 0);
}

.book-card__link:hover {
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .book-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
  }

  .book-card__cover {
    width: 120px;
  }

  .book-card__title-row {
    justify-content: center;
  }

  .book-card__link {
    opacity: 1;
    transform: none;
    position: static;
    width: auto;
    height: auto;
    background: none;
    margin-top: var(--space-xs);
  }
}

/* ===== CONTACT SECTION ===== */
#contact {
  background: var(--bg-tertiary) !important;
  padding: var(--space-5xl) var(--container-padding);
}

.contact-content {
  max-width: var(--container-max);
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: var(--space-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
  width: 100%;
}

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

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

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

.submit-btn {
  align-self: flex-start;
}

.error-message {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  font-size: 0.875rem;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
}

.success-message {
  text-align: center;
  padding: var(--space-3xl);
}

.success-icon {
  color: #10b981;
  margin-bottom: var(--space-lg);
}

.success-message h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.success-message > p {
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.contact-info-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.info-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item svg {
  flex-shrink: 0;
  color: var(--accent);
}

.info-item a {
  color: var(--accent);
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-primary) !important;
  padding: var(--space-4xl) var(--container-padding);
  border-top: 1px solid var(--border-color);
  margin: 0 !important;
}

.footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1rem;
  color: var(--text-muted) !important;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.footer-social a:hover {
  color: var(--accent) !important;
  border-color: var(--accent);
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.back-to-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-muted) !important;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.back-to-top:hover {
  color: var(--accent) !important;
  border-color: var(--accent);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-primary);
  background: var(--glass-bg) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border) !important;
  border-radius: var(--radius-md) !important;
  cursor: pointer;
  z-index: 1000;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md) !important;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-image {
    position: static;
    justify-self: center;
  }

  .about-details {
    justify-content: center;
  }

  .resume-content {
    grid-template-columns: 1fr;
  }

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

  .contact-info-card {
    order: -1;
  }
}

@media (max-width: 640px) {
  :root {
    --container-padding: var(--space-lg);
    --space-5xl: 5rem;
  }

  /* Show hamburger on mobile */
  .hamburger {
    display: flex;
  }

  #nav-wrap {
    display: flex;
    justify-content: flex-end;
  }

  /* Nav overlay */
  .nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    animation: fadeIn var(--transition-fast) ease-out;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* Mobile nav menu */
  ul#nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 80vw);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xl);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform var(--transition-base);
  }

  #nav-wrap.menu-open ul#nav {
    transform: translateX(0);
  }

  ul#nav li a {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-lg);
  }

  .hero-content h1 {
    font-size: var(--text-3xl);
  }

  .hero-description {
    font-size: var(--text-base);
  }

  .hero-social {
    gap: var(--space-xs);
  }

  .hero-social a {
    width: 44px;
    height: 44px;
    font-size: 1.125rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-cta .button,
  .hero-cta .button-secondary {
    width: 100%;
  }

  .about-text h2 {
    font-size: var(--text-2xl);
  }

  .about-text > p {
    font-size: var(--text-base);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

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

  .timeline {
    padding-left: var(--space-lg);
  }

  .timeline-marker {
    left: calc(-1 * var(--space-lg) - 14px);
    width: 28px;
    height: 28px;
  }

  .timeline-marker .company-logo {
    width: 16px;
    height: 16px;
  }

  .section-title {
    font-size: var(--text-2xl);
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  animation: fadeInUp 0.6s ease-out;
}

/* ===== ACCESSIBILITY - Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body::before,
  body::after {
    animation: none;
    opacity: 0.5;
  }

  section {
    animation: none;
  }

  .scroll-indicator a {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
