/* ===================================
   Fayez Portfolio - Styles
   A minimal, elegant design system
   =================================== */

/* --- CSS Custom Properties --- */
:root {
  /* Color Palette - Warm, sophisticated tones */
  --color-bg: #FAFAF8;
  --color-bg-alt: #F5F4F0;
  --color-surface: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-muted: #6B6B6B;
  --color-text-subtle: #9A9A9A;
  --color-accent: #2D5A4A;
  --color-accent-light: #3D7A64;
  --color-accent-soft: rgba(45, 90, 74, 0.1);
  --color-border: rgba(26, 26, 26, 0.08);
  --color-border-strong: rgba(26, 26, 26, 0.15);
  
  /* Typography */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Syne', system-ui, sans-serif;
  
  /* Spacing Scale */
  --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;
  
  /* Sizing */
  --container-max: 1200px;
  --container-narrow: 800px;
  
  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--color-accent);
  color: white;
}

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

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

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

ul, ol {
  list-style: none;
}

/* --- Cursor Glow Effect --- */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, var(--color-accent-soft) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

body:hover .cursor-glow {
  opacity: 1;
}

@media (hover: none) {
  .cursor-glow {
    display: none;
  }
}

/* --- Navigation (Left Sidebar) --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-lg);
  background: rgba(250, 250, 248, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(26, 26, 26, 0.05);
  z-index: 1000;
  transition: all var(--duration-normal) var(--ease-out);
}

.nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-logo {
  position: absolute;
  top: var(--space-2xl);
  display: flex;
  align-items: baseline;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  transition: opacity var(--duration-fast);
}

.nav-logo:hover {
  opacity: 0.7;
}

.logo-dot {
  color: var(--color-accent);
  font-size: 1.75rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  position: relative;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  color: var(--color-text-muted);
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 28px;
  height: 28px;
  justify-content: center;
  z-index: 1001;
}

.toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease-out);
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .toggle-bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .toggle-bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
  transition: all var(--duration-normal) var(--ease-out);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  text-align: center;
}

.mobile-links li {
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--duration-slow) var(--ease-out);
  transition-delay: calc(var(--delay) * 80ms);
}

.mobile-menu.active .mobile-links li {
  opacity: 1;
  transform: translateY(0);
}

.mobile-links a {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-style: italic;
  color: var(--color-text);
  transition: color var(--duration-fast);
}

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

@media (max-width: 768px) {
  .nav {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 64px;
    flex-direction: row;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }
  
  .nav-logo {
    position: static;
  }
  
  .nav-links {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .section {
    padding-left: var(--space-md);
  }
}

/* --- Sections --- */
.section {
  min-height: 100vh;
  padding: var(--space-5xl) var(--space-xl);
  padding-left: calc(160px + var(--space-2xl));
}

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

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

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Hero Section --- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.hero-content {
  max-width: var(--container-narrow);
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-accent);
  background: var(--color-surface);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-2xl);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xl);
}

.title-line {
  display: block;
}

.title-line em {
  font-style: italic;
  color: var(--color-accent);
}

.title-accent {
  font-size: 0.85em;
  color: var(--color-text-muted);
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  max-width: 540px;
  margin: 0 auto var(--space-2xl);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-4xl);
}

.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-subtle);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.scroll-indicator {
  width: 24px;
  height: 40px;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.3; }
}

/* Hero Shapes */
.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--color-accent-soft) 0%, transparent 70%);
  top: -10%;
  right: -5%;
  animation: float 20s ease-in-out infinite;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(200, 180, 160, 0.2) 0%, transparent 70%);
  bottom: 10%;
  left: -5%;
  animation: float 25s ease-in-out infinite reverse;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--color-accent-soft) 0%, transparent 70%);
  top: 40%;
  left: 15%;
  animation: float 15s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(20px, -20px) rotate(5deg); }
  50% { transform: translate(-10px, 10px) rotate(-5deg); }
  75% { transform: translate(10px, 20px) rotate(3deg); }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  font-weight: 600;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out);
}

.btn-primary {
  background: var(--color-accent);
  color: white;
  box-shadow: 0 4px 14px rgba(45, 90, 74, 0.3);
}

.btn-primary:hover {
  background: var(--color-accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 90, 74, 0.35);
}

.btn-primary svg {
  transition: transform var(--duration-fast);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}

.btn-secondary:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-text-subtle);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.btn-full {
  width: 100%;
}

/* --- Resume Button with Popup --- */
.resume-btn-wrapper {
  position: relative;
}

.resume-btn-wrapper .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.resume-btn-wrapper .btn-secondary svg {
  width: 16px;
  height: 16px;
}

.resume-popup {
  position: absolute;
  bottom: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(15px) scale(0.9);
  width: 320px;
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 12px 24px -8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100;
  overflow: hidden;
}

.resume-btn-wrapper:hover .resume-popup {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
}

.resume-popup::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  transform: translateX(-50%) rotate(45deg);
}

.resume-preview-img {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  display: block;
  transition: transform 0.3s ease;
}

.resume-btn-wrapper:hover .resume-preview-img {
  transform: scale(1.02);
}

/* --- Animations --- */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  animation: animateIn 0.8s var(--ease-out) forwards;
  animation-delay: calc(var(--delay) * 150ms);
}

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

[data-animate] {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--ease-out);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Experience Section --- */
.experience {
  background: var(--color-bg-alt);
}

.timeline {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-3xl);
}

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

.timeline-item:last-child .marker-line {
  display: none;
}

.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.marker-dot {
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--color-accent-soft);
  flex-shrink: 0;
}

.marker-line {
  width: 2px;
  flex: 1;
  background: var(--color-border);
  margin-top: var(--space-sm);
}

.timeline-content {
  background: var(--color-surface);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-out);
}

.timeline-content:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.timeline-role {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: var(--space-xs);
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--color-accent);
  font-weight: 500;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--color-text-subtle);
  white-space: nowrap;
}

.timeline-description {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.timeline-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
}

/* Skills Overview */
.skills-overview {
  margin-top: var(--space-4xl);
  background: var(--color-surface);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
}

.skills-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: var(--space-xl);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}

.skill-category h4 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent-soft);
}

.skill-category ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.skill-category li {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- Projects Section --- */
.projects {
  background: var(--color-bg);
}

/* Gallery Component */
.gallery {
  position: relative;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  gap: var(--space-xl);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: var(--space-md) 0;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  flex: 0 0 calc(100% - var(--space-xl));
  max-width: 900px;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-2xl);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--duration-normal) var(--ease-out);
}

.gallery-item:hover {
  box-shadow: var(--shadow-lg);
}

.gallery-image {
  position: relative;
  min-height: 400px;
  overflow: hidden;
}

.gallery-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    hsl(var(--hue, 150) 30% 95%) 0%,
    hsl(var(--hue, 150) 40% 88%) 100%
  );
  transition: transform var(--duration-slow) var(--ease-out);
}

.gallery-item:hover .gallery-placeholder {
  transform: scale(1.05);
}

.gallery-placeholder svg {
  width: 80px;
  height: 80px;
  color: hsl(var(--hue, 150) 25% 60%);
  opacity: 0.6;
}

.gallery-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-2xl);
  padding-left: 0;
}

.gallery-number {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-style: italic;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.gallery-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.gallery-description {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.gallery-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
}

.gallery-tech span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-subtle);
  background: var(--color-bg-alt);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gallery-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--color-accent);
  transition: gap var(--duration-normal) var(--ease-out);
}

.gallery-link:hover {
  gap: var(--space-md);
}

.gallery-link svg {
  transition: transform var(--duration-normal) var(--ease-out);
}

.gallery-link:hover svg {
  transform: translate(2px, -2px);
}

/* Gallery Navigation */
.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.gallery-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.gallery-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  transform: scale(1.05);
}

.gallery-dots {
  display: flex;
  gap: var(--space-sm);
}

.gallery-dot {
  width: 10px;
  height: 10px;
  background: var(--color-border-strong);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.gallery-dot:hover {
  background: var(--color-text-subtle);
}

.gallery-dot.active {
  width: 32px;
  background: var(--color-accent);
}

/* Gallery Responsive */
@media (max-width: 900px) {
  .gallery-item {
    grid-template-columns: 1fr;
    flex: 0 0 100%;
  }
  
  .gallery-image {
    min-height: 250px;
  }
  
  .gallery-info {
    padding: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .gallery-track {
    gap: var(--space-md);
  }
  
  .gallery-image {
    min-height: 200px;
  }
  
  .gallery-info {
    padding: var(--space-lg);
  }
  
  .gallery-btn {
    width: 40px;
    height: 40px;
  }
}

.projects-cta {
  text-align: center;
  margin-top: var(--space-3xl);
}

.projects-cta p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}

/* --- Contact Section (Minimal) --- */
.contact {
  background: var(--color-bg);
}

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

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

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

.contact-icon {
  display: none;
}

.contact-details h4 {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-subtle);
  margin-bottom: 0;
}

.contact-details a,
.contact-details p {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-text);
  line-height: 1.3;
}

.contact-details a {
  transition: color var(--duration-fast);
  display: inline-block;
}

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

.social-links {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.social-link {
  width: auto;
  height: auto;
  background: none;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all var(--duration-normal) var(--ease-out);
  padding: 0;
}

.social-link:hover {
  background: none;
  border-color: transparent;
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* Contact Form (Minimal) */
.contact-form {
  background: transparent;
  padding: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.form-group {
  margin-bottom: var(--space-xl);
}

.form-group label {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-subtle);
  margin-bottom: var(--space-sm);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-md) 0;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  transition: all var(--duration-fast);
  resize: none;
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: none;
}

/* --- Footer --- */
.footer {
  background: var(--color-bg);
  padding: var(--space-xl);
  padding-left: calc(160px + var(--space-2xl));
  border-top: 1px solid var(--color-border);
}

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

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

.back-to-top {
  width: 40px;
  height: 40px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all var(--duration-normal) var(--ease-out);
}

.back-to-top:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  transform: translateY(-2px);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .section {
    padding: var(--space-3xl) var(--space-md);
  }
  
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .timeline-item {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .timeline-marker {
    flex-direction: row;
    gap: var(--space-sm);
  }
  
  .marker-line {
    height: 2px;
    width: 30px;
    margin-top: 0;
  }
  
  .timeline-header {
    flex-direction: column;
    gap: var(--space-xs);
  }
  
  .footer-content {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
  
  .footer {
    padding-left: var(--space-md);
  }
}

@media (max-width: 480px) {
  :root {
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 2.5rem;
    --space-4xl: 3rem;
    --space-5xl: 4rem;
  }
  
  .nav {
    padding: 0 var(--space-md);
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Print Styles --- */
@media print {
  .nav,
  .mobile-menu,
  .cursor-glow,
  .hero-shapes,
  .hero-scroll {
    display: none;
  }
  
  .section {
    padding: var(--space-xl) 0;
    min-height: auto;
    page-break-inside: avoid;
  }
}

/* --- 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;
  }
}

