:root {
  /* Color Palette */
  --bg-primary: #fafaf9;
  --bg-secondary: #f2f2f0;
  --bg-tertiary: #e8e8e6;
  --text-primary: #1a1a1a;
  --text-secondary: #6b6b6b;
  --text-tertiary: #9a9a9a;
  --accent: #0055ff;
  --accent-hover: #0044cc;
  --accent-muted: rgba(0, 85, 255, 0.08);
  --border: #e0e0de;
  --border-hover: #ccccc9;

  /* Typography */
  --font-headings: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --layout-width: 720px;
  --transition: 0.2s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.2;
}

p {
  font-size: clamp(1rem, 1vw + 0.8rem, 1.125rem);
  margin-bottom: 1.25rem;
}

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

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

.layout-container {
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 0;
  transition: all var(--transition);
}

nav.scrolled {
  background-color: rgba(250, 250, 249, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

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

.logo {
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
}

.hero h1 {
  font-size: clamp(3rem, 5vw + 1rem, 5rem);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: clamp(1rem, 2vw + 0.5rem, 1.5rem);
  margin-bottom: 2rem;
}

.hero p {
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.hero-ctas {
  display: flex;
  gap: 1.5rem;
}

.cta-link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Sections */
section {
  padding: 6rem 0;
  scroll-margin-top: 4rem;
}

.section-alt {
  background-color: var(--bg-secondary);
}

.section-title {
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.subsection-title {
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

/* About */
.about-content {
  display: flex;
  flex-direction: column-reverse;
  gap: 2rem;
}

.about-text {
  flex: 1;
}

.profile-img-container {
  display: flex;
  justify-content: center;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.stats-row {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Projects */
.project-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  transition: all var(--transition);
  background: var(--bg-primary);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px var(--accent-muted);
}

.project-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.project-img.placeholder {
  background: linear-gradient(135deg, var(--bg-secondary), var(--accent-muted));
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-link {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.75rem;
  display: inline-block;
}

.project-info {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-muted);
  color: var(--accent);
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Experience */
.timeline-item {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 2rem;
  border-left: 2px solid var(--border);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.exp-role {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1.1rem;
}

.exp-company {
  color: var(--text-secondary);
  font-weight: 500;
}

.exp-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.education {
  margin-top: 4rem;
}

.certifications {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
}

.skills {
  margin-top: 4rem;
}

/* Skills */
.skill-category {
  margin-bottom: 2rem;
}

.skill-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  display: inline-block;
  width: 120px;
}

.skill-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.skill-pill:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Contact */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.social-icons {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-icons svg {
  width: 24px;
  height: 24px;
  fill: var(--text-secondary);
  transition: fill var(--transition);
}

.social-icons a:hover svg {
  fill: var(--accent);
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Responsive */
@media (min-width: 768px) {
  .about-content {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .project-card {
    flex-direction: row;
  }

  .project-img {
    width: 40%;
    aspect-ratio: 4/3;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }

  .project-info {
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 250px;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 6rem 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.05);
    transition: right var(--transition);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .mobile-toggle {
    display: block;
    z-index: 101;
  }
  
  .hamburger {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    transition: all var(--transition);
  }
  
  .hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition);
  }
  
  .hamburger::before { top: -6px; }
  .hamburger::after { bottom: -6px; }
  
  .mobile-toggle.active .hamburger { background: transparent; }
  .mobile-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
  .mobile-toggle.active .hamburger::after { transform: rotate(-45deg); bottom: 0; }
  
  .skill-label {
    display: block;
    margin-bottom: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
