/* ===========================
   Personal Portfolio - Minimal CV Style
   =========================== */

:root {
  --bg: #09090b;
  --bg-subtle: #0c0c0e;
  --bg-elevated: #131316;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-dim: #52525b;
  --border: #27272a;
  --border-subtle: #1f1f23;

  --aws: #ff9900;
  --gcp: #4285f4;
  --azure: #0078d4;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

/* Light theme */
[data-theme="light"] {
  --bg: #fafafa;
  --bg-subtle: #f4f4f5;
  --bg-elevated: #ffffff;
  --text: #09090b;
  --text-secondary: #3f3f46;
  --text-muted: #52525b;
  --text-dim: #71717a;
  --border: #d4d4d8;
  --border-subtle: #e4e4e7;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

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

ul {
  list-style: none;
}

/* Layout */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 48px;
}

.nav {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
}

.back-link {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  -webkit-transition: color 0.15s;
  transition: color 0.15s;
}

.back-link > * + * {
  margin-left: 8px;
}

.back-link:hover {
  color: var(--text-secondary);
}

/* Nav Controls */
.nav-controls {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.nav-controls > * + * {
  margin-left: 8px;
}

.theme-toggle,
.lang-toggle {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 6px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  cursor: pointer;
  -webkit-transition: all 0.15s;
  transition: all 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.theme-toggle:hover,
.lang-toggle:hover {
  color: var(--text);
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

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

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

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

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

.lang-toggle {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.lang-current {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

/* Hero */
.hero {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 48px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.hero-name {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-bio {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.location {
  color: var(--text-muted);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.link-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: all 0.15s;
}

.link-item:hover {
  border-color: var(--border);
  background: var(--border-subtle);
}

.link-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.link-value {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Sections */
.section {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* About */
.about-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.75;
}

.about-content p:last-child {
  margin-bottom: 24px;
}

.languages {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.lang-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-name {
  font-size: 14px;
  color: var(--text);
}

.lang-level {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  padding-top: 2px;
}

.timeline-content h3 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.timeline-item.collapsed .timeline-content {
  padding-top: 4px;
}

.timeline-earlier {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

.timeline-earlier strong {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Contract Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-card {
  padding: 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: all 0.15s;
}

.project-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.project-header {
  margin-bottom: 12px;
}

.project-period {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.project-title {
  font-size: 15px;
  font-weight: 500;
  margin: 4px 0;
}

.project-company {
  font-size: 13px;
  color: var(--text-muted);
}

.project-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 12px;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-stack span {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-dim);
}

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

.skill-group h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.skill-group ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-group li {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Certifications */
.certs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.cert-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 48px;
  text-align: center;
}

.cert-badge.aws {
  background: rgba(255, 153, 0, 0.12);
  color: var(--aws);
}

.cert-badge.gcp {
  background: rgba(66, 133, 244, 0.12);
  color: var(--gcp);
}

.cert-badge.azure {
  background: rgba(0, 120, 212, 0.12);
  color: var(--azure);
}

/* Education */
.education {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.edu-degree {
  font-size: 15px;
  font-weight: 500;
}

.edu-school {
  font-size: 14px;
  color: var(--text-secondary);
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* Footer */
.footer {
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
}

.footer a {
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer a:hover {
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }

  .hero-name {
    font-size: 28px;
  }

  .hero-links {
    flex-direction: column;
  }

  .link-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

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

  .footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* Selection */
::selection {
  background: var(--border);
  color: var(--text);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
