/* Reset */

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

html {
  overflow-y: scroll;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

/* Root Variables (Design System) */

:root {
  --max-width: 720px;

  --color-text: #111;
  --color-muted: #555;
  --color-border: #e5e5e5;
  --color-bg: #ffffff;

  --font-system:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Open Sans", "Helvetica Neue", sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
}

/* Dark Theme */

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --color-text: #e5e7eb;
    --color-muted: #9ca3af;
    --color-border: #2a2a2a;
    --color-bg: #090d18;
  }
}

/* Manual Dark Mode */

.dark {
  --color-text: #e5e7eb;
  --color-muted: #9ca3af;
  --color-border: #2a2a2a;
  --color-bg: #090d18;
}

.dark .social-links img {
  filter: invert(1);
}

.dark #theme-toggle img {
  filter: invert(1);
}

/* Manual Light Mode */

.light {
  --color-text: #111;
  --color-muted: #555;
  --color-border: #e5e5e5;
  --color-bg: #ffffff;
}

/* Base Typography */

body {
  font-family: var(--font-system);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 1rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: var(--space-xs);
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0;
}

p {
  margin-bottom: var(--space-xs);
  color: var(--color-text);
  max-width: 80ch;
}

a {
  color: var(--color-text);
  opacity: 0.7;
  text-decoration: none;
}

a:hover {
  opacity: 1;
}

/* Layout Container */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: var(--space-md);
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
}

/* Hero */

.hero {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.avatar-wrapper {
  aspect-ratio: 1 / 1;
  height: 100%;
  max-height: 180px;
}

.avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.hero-content {
  max-width: 60ch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.intro {
  max-width: 60ch;
  line-height: 1.7;
}

.social-links {
  margin-top: var(--space-sm);
  display: flex;
  gap: var(--space-md);
}

.social-links img {
  width: 22px;
  height: 22px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.social-links img:hover {
  opacity: 1;
}

.meta {
  display: block;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Sections */

.section {
  margin: 0;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}

/* Header / Navigation */

nav {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
}

nav ul {
  display: flex;
  gap: var(--space-lg);
  justify-content: flex-start;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  letter-spacing: 0.02rem;
  padding-bottom: 0.2rem;
}

nav a:hover {
  color: var(--color-text);
}

nav a.active {
  color: var(--color-text);
  font-weight: 600;
  border-bottom: 2px solid var(--color-text);
}

#theme-toggle img {
  width: 22px;
  height: 22px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

#theme-toggle img:hover {
  opacity: 1;
}

/* Footer */

footer {
  padding: var(--space-md) 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

/* Experience Page */

.experience-block ul {
  margin-bottom: var(--space-md);
  padding-left: 1.25rem;
  list-style: disc;
}

.experience-block li {
  margin-bottom: var(--space-xs);
}

.experience-block p + ul {
  margin-top: var(--space-sm);
}

strong {
  font-weight: 600;
}

.experience-block p a {
  text-decoration: underline;
}

.experience-block p strong {
  color: var(--color-text);
  margin-right: 6px;
}

/* Projects Page */

.project {
  margin: 0;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}

.project h2 {
  margin: 0;
}

.project ul {
  margin-bottom: var(--space-md);
  padding-left: 1.2rem;
  list-style: disc;
}

.project li {
  margin-bottom: 0.1rem;
}

.meta {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.project p a {
  text-decoration: underline;
}

.project p strong {
  color: var(--color-text);
  margin-right: 6px;
}
