@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@700&display=swap');

:root {
  --bg: #f3f4f6;
  --text: #1f2937;
  --text-muted: #4b5563;
  --border: #d1d5db;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #171717;
  --text: #f5f5f5;
  --text-muted: #a3a3a3;
  --border: #404040;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
}

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

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

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

/* Navigation */
nav {
  margin-bottom: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  padding: 0;
  margin-left: 1rem;
}

.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

[data-theme="dark"] .sun-icon {
  display: none;
}
:root:not([data-theme="dark"]) .moon-icon {
  display: none;
}

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.7;
}

.subtitle {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-text .subtitle {
  margin-bottom: 0.2rem;
}

.education {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 2rem;
  font-weight: 500;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
}

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

.hero-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  align-items: center;
}

.hero-links .sep {
  color: var(--border);
}

.hero-links a {
  color: var(--text-muted);
  font-weight: 500;
}

.hero-links a:hover {
  color: var(--text);
  text-decoration: none;
}

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

.project-item {
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: block;
}

.project-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  text-decoration: none;
}

.project-item p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

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

.tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid transparent;
}

/* Cohesive Tag Palette (Light Mode) */
.tag:nth-child(5n+1) { background-color: #eff6ff; color: #2563eb; border-color: #bfdbfe; } /* Blue */
.tag:nth-child(5n+2) { background-color: #f5f3ff; color: #7c3aed; border-color: #ddd6fe; } /* Violet */
.tag:nth-child(5n+3) { background-color: #f0fdf4; color: #16a34a; border-color: #bbf7d0; } /* Green */
.tag:nth-child(5n+4) { background-color: #fffbeb; color: #d97706; border-color: #fde68a; } /* Amber */
.tag:nth-child(5n+5) { background-color: #f8fafc; color: #475569; border-color: #e2e8f0; } /* Slate */

/* Cohesive Tag Palette (Dark Mode) */
[data-theme="dark"] .tag:nth-child(5n+1) { background-color: rgba(37, 99, 235, 0.15); color: #60a5fa; border-color: rgba(37, 99, 235, 0.3); }
[data-theme="dark"] .tag:nth-child(5n+2) { background-color: rgba(124, 58, 237, 0.15); color: #a78bfa; border-color: rgba(124, 58, 237, 0.3); }
[data-theme="dark"] .tag:nth-child(5n+3) { background-color: rgba(22, 163, 74, 0.15); color: #4ade80; border-color: rgba(22, 163, 74, 0.3); }
[data-theme="dark"] .tag:nth-child(5n+4) { background-color: rgba(217, 119, 6, 0.15); color: #fbbf24; border-color: rgba(217, 119, 6, 0.3); }
[data-theme="dark"] .tag:nth-child(5n+5) { background-color: rgba(71, 85, 105, 0.15); color: #94a3b8; border-color: rgba(71, 85, 105, 0.3); }

/* Footer */
footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}

/* Hero Layout & Photo Slot */
.happy-name {
  color: var(--text);
}

.hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.hero-text {
  flex: 1;
}

.hero-photo-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  margin-right: 2rem;
}

.photo-slot {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-note {
  position: absolute;
  left: 155px;
  top: 10px;
  width: 150px;
  font-family: 'Comic Neue', "Comic Sans MS", cursive;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.25;
  text-align: left;
  transform: rotate(6deg);
}

.photo-note svg {
  position: absolute;
  left: -40px;
  top: 15px;
  color: var(--text-muted);
  transform: scaleX(-1) rotate(15deg);
}

@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  .nav-links { gap: 1rem; }
  
  .hero-layout {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
  .hero-photo-container {
    align-self: center;
    margin-right: 0;
    margin-bottom: 2.5rem;
    margin-left: 0;
  }
  .photo-note {
    left: 145px;
    top: 5px;
    text-align: left;
    transform: rotate(4deg);
  }
  .photo-note svg {
    left: -40px;
    top: 20px;
    transform: scaleX(-1) rotate(15deg);
  }
}
