:root {
  color-scheme: dark;
  --bg: #090a0f;
  --bg-subtle: #11131a;
  --bg-card: #13151f;
  --border: #222634;
  --border-hover: #33384a;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #85cae9;
  --accent-hover: #7dd3fc;
  --badge-bg: #181b26;
  --badge-text: #cbd5e1;
  --badge-border: #262b3a;
  --radius: 8px;
  --radius-sm: 5px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 3rem 1.25rem 5rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.container {
  max-width: 720px;
  margin: 0 auto;
}

/* Header */
header {
  margin-bottom: 3.5rem;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

h1.name {
  font-size: 2.1rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
}

.contact-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-top: 0.75rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

.contact-item svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Sections */
section {
  margin-bottom: 3.25rem;
}

.section-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Skills */
.skills-grid {
  display: grid;
  gap: 1.1rem;
}

.skill-category {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.skill-category-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  padding: 0.22rem 0.55rem;
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
}

/* Projects */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--border);
}

.project-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.project-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-title {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  transition: all 0.15s ease;
}

.project-link:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.project-link svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-tech {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  line-height: 1.45;
}

.project-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 0;
}

.project-bullets li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-bullets li::before {
  content: "–";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text-muted);
  font-weight: 600;
}

/* Education */
.education-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.institution {
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text-primary);
}

.date-range {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.degree {
  font-size: 0.93rem;
  color: var(--text-secondary);
}

/* Awards */
.awards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.awards-list li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
}

.awards-list li::before {
  content: "🏆";
  position: absolute;
  left: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

/* Responsive adjustments */
@media (max-width: 600px) {
  body {
    padding: 2rem 1rem 3.5rem;
  }

  h1.name {
    font-size: 1.8rem;
  }

  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .education-header {
    flex-direction: column;
    gap: 0.15rem;
  }
}

/* Print Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0;
    font-size: 11pt;
    line-height: 1.4;
  }

  footer {
    display: none !important;
  }

  .container {
    max-width: 100%;
  }

  .section-title::after {
    background: #000000 !important;
  }

  .tag, .project-link {
    background: transparent !important;
    border: 1px solid #999999 !important;
    color: #000000 !important;
  }

  .project-link svg {
    display: none;
  }

  .project-card {
    border-bottom: 1px solid #cccccc;
    page-break-inside: avoid;
  }

  a {
    color: #000000 !important;
    text-decoration: none !important;
  }
}
