/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #fdf0f6;
  --color-text: #2a2a2a;
  --color-link: #2a2a2a;
  --color-link-hover: #f698c0;
  --color-nav-bg: #fdf0f6;
  --color-border: #e8cedd;
  --color-muted: #666666;
  --font-body: "Andale Mono", "Consolas", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Monaco", "Courier New", "Courier", monospace;
  --font-sans: "Andale Mono", "Consolas", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Monaco", "Courier New", "Courier", monospace;
  --max-width: 820px;
  --nav-height: 56px;
}

/* Dark mode — OS preference */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #2a2a2a;
    --color-text: #e8e8e8;
    --color-link: #e8e8e8;
    --color-link-hover: #f698c0;
    --color-nav-bg: #2a2a2a;
    --color-border: #444444;
    --color-muted: #999999;
  }
}

/* Manual overrides via data-theme attribute */
[data-theme="light"] {
  --color-bg: #fdf0f6;
  --color-text: #2a2a2a;
  --color-link: #2a2a2a;
  --color-link-hover: #f698c0;
  --color-nav-bg: #fdf0f6;
  --color-border: #e8cedd;
  --color-muted: #666666;
}

[data-theme="dark"] {
  --color-bg: #2a2a2a;
  --color-text: #e8e8e8;
  --color-link: #e8e8e8;
  --color-link-hover: #f698c0;
  --color-nav-bg: #2a2a2a;
  --color-border: #444444;
  --color-muted: #999999;
}

/* Custom cursor */
:root {
  --cursor-default: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><text y='28' font-size='28'>✨</text></svg>") 8 8, auto;
  --cursor-pointer: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><text y='28' font-size='28'>✨</text></svg>") 8 8, pointer;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  cursor: var(--cursor-default);
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: var(--cursor-pointer);
}

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-text);
  color: var(--color-bg);
  padding: 8px 16px;
  z-index: 9999;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* Navigation */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-nav-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

nav ul li a {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 400;
  letter-spacing: 0.01em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}

nav ul li a:hover,
nav ul li a[aria-current="page"] {
  border-bottom-color: var(--color-text);
}

/* Main content */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
  width: 100%;
}

/* Home page */
.home-hero {
  margin-bottom: 64px;
}

.home-hero h3 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: normal;
  margin-bottom: 40px;
  line-height: 1.4;
  text-align: center;
}

.hero-image {
  margin-bottom: 5px;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

.testimonials {
  display: flex;
  flex-direction: row;
  gap: 48px;
  align-items: flex-start;
  margin-top: -5px;
}

.testimonial {
  flex: 1;
}

.testimonial blockquote {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 12px;
  font-style: normal;
}

.testimonial cite {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-style: normal;
  color: var(--color-muted);
  display: block;
}

/* About page */
.about-section {
  margin-bottom: 56px;
}

.about-section h1 {
  font-size: 2rem;
  font-weight: normal;
  margin-bottom: 20px;
  font-family: var(--font-body);
}

.about-section p {
  font-size: 1rem;
  line-height: 1.8;
  max-width: 680px;
  margin-bottom: 16px;
}

.linkedin-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.linkedin-link {
  color: var(--color-link-hover);
  display: inline-flex;
  transition: opacity 0.15s;
}

.linkedin-link:hover {
  opacity: 0.8;
}

/* Portfolio page */
.portfolio-section {
  margin-bottom: 56px;
}

.portfolio-section h1 {
  font-size: 2rem;
  font-weight: normal;
  margin-bottom: 6px;
  font-family: var(--font-body);
}

.portfolio-section h2 {
  font-size: 1.375rem;
  font-weight: normal;
  margin-bottom: 16px;
  font-family: var(--font-body);
  margin-top: 32px;
}

.portfolio-section p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 680px;
}

.portfolio-section ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
  max-width: 680px;
}

.portfolio-section ul li {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 4px;
}

.portfolio-section ul li ul {
  margin-top: 4px;
  margin-bottom: 4px;
}

.project-entry {
  margin-bottom: 28px;
  max-width: 680px;
}

.project-entry h3 {
  font-size: 1rem;
  font-weight: normal;
  font-style: italic;
  margin-bottom: 4px;
}

.project-entry .project-links {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  margin-bottom: 8px;
  color: var(--color-muted);
}

.project-entry .project-links a {
  color: var(--color-text);
}

.project-entry p {
  margin-bottom: 8px;
}

/* Section divider */
.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 56px 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--color-border);
  padding: 24px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-muted);
  text-align: center;
}

footer a {
  color: var(--color-muted);
}

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: var(--cursor-pointer);
  margin-left: 24px;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

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

/* Responsive */
@media (max-width: 600px) {
  main {
    padding: 32px 16px 60px;
  }

  .nav-inner {
    padding: 0 16px;
  }

  .home-hero h3 {
    font-size: 1.25rem;
  }

  .testimonials {
    flex-direction: column;
  }

  .testimonial blockquote {
    font-size: 0.9375rem;
  }
}
