:root {
  --color-bg: #fafaf9;
  --color-text: #1c1917;
  --color-text-muted: #57534e;
  --color-accent: #2563eb;
  --color-border: #d6d3d1;
  --color-card: #ffffff;
  --color-photo-border: rgb(200, 200, 200);
  --font-serif: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', monospace;
}

[data-theme="dark"] {
  --color-bg: #1e1e1e;
  --color-text: #d4d4d4;
  --color-text-muted: #9d9d9d;
  --color-accent: #4fc1ff;
  --color-border: #3c3c3c;
  --color-card: #252526;
  --color-photo-border: #4d4d4d;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
header {
  padding: 6rem 0 4rem;
  border-bottom: 1px solid var(--color-border);
}

.header-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
}

.header-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%);
  transition: filter 0.3s ease;
  border: 1px solid var(--color-photo-border);
}

.header-photo:hover {
  filter: grayscale(0%);
}

.header-title h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.header-title h1 span {
  font-weight: 400;
  color: var(--color-text-muted);
}

.header-title p {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-contact {
  text-align: right;
  font-size: 0.9rem;
}

.header-contact a,
.header-contact span {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--color-text-muted);
}

.header-contact a:hover {
  color: var(--color-accent);
  opacity: 1;
}

/* Intro */
.intro {
  padding: 4rem 0;
  border-bottom: 1px solid var(--color-border);
}

.intro p {
  font-size: 1.25rem;
  line-height: 1.7;
  max-width: 680px;
  color: var(--color-text);
}

.intro strong {
  font-weight: 600;
}

/* Section */
section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--color-border);
}

section:last-of-type {
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Experience */
.experience-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.experience-item:nth-child(1) { animation-delay: 0.1s; }
.experience-item:nth-child(2) { animation-delay: 0.2s; }
.experience-item:nth-child(3) { animation-delay: 0.3s; }
.experience-item:nth-child(4) { animation-delay: 0.4s; }
.experience-item:nth-child(5) { animation-delay: 0.5s; }
.experience-item:nth-child(6) { animation-delay: 0.6s; }

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

.experience-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.experience-meta .company {
  display: block;
  color: var(--color-text);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.experience-meta .sector {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.experience-meta .date {
  display: block;
  white-space: nowrap;
}

.experience-content h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.experience-content .stack {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.experience-content ul {
  list-style: none;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.experience-content li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.4rem;
}

.experience-content li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--color-border);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.skill-category h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.skill-category ul {
  list-style: none;
}

.skill-category li {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

/* Footer */
footer {
  padding: 4rem 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

/* Top Controls (Theme & Language) */
.top-controls {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.lang-switch a,
.theme-switch button {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lang-switch a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.lang-switch a:hover,
.theme-switch button:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 1;
}

.theme-switch svg {
  width: 20px;
  height: 20px;
  color: var(--color-text);
  transition: color 0.3s ease;
}

.theme-switch .icon-sun {
  display: none;
}

.theme-switch .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-switch .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-switch .icon-moon {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 4rem 0 3rem;
  }

  .header-content {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
  }

  .header-photo {
    width: 80px;
    height: 80px;
    grid-row: 1;
  }

  .header-title {
    grid-row: 1;
    align-self: center;
  }

  .header-contact {
    grid-column: 1 / -1;
    text-align: left;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .experience-meta .company {
    display: inline;
  }

  .experience-meta .company::after {
    content: ' · ';
  }

  .experience-meta .sector {
    display: inline;
  }

  .experience-meta .date {
    display: block;
    margin-top: 0.25rem;
  }
}
