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

:root {
  /* Elegant three-tone color scheme */
  --color-bg: #0a0a0a;
  --color-surface: #1a1a1a;
  --color-primary: #f5f5f5;
  --color-accent: #4a9eff;
  --color-highlight: #ff6b6b;
  --color-subtle: #666;
  
  /* Typography */
  --font-display: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'SF Pro Text', system-ui, -apple-system, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  
  /* Effects */
  --shadow-sharp: 6px 6px 0 var(--color-accent);
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #f8f9fa;
    --color-surface: #ffffff;
    --color-primary: #0a0a0a;
    --color-accent: #0066cc;
    --color-highlight: #ff4757;
    --color-subtle: #999;
  }
}

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

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

/* Main Container */
main {
  width: 100%;
  max-width: 42rem;
}

article {
  background: var(--color-surface);
  padding: var(--space-xl);
  border-radius: 0;
  box-shadow: var(--shadow-sharp);
  position: relative;
  border: 2px solid var(--color-primary);
}

@media (max-width: 640px) {
  article {
    padding: var(--space-lg);
    box-shadow: 4px 4px 0 var(--color-accent);
  }
}

/* Typography */
h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.highlight {
  background: linear-gradient(135deg, var(--color-accent), var(--color-highlight));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  position: relative;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0.1em;
  left: 0;
  right: 0;
  height: 0.15em;
  background: var(--color-accent);
  opacity: 0.3;
  transform: skewY(-1deg);
}

.lead {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--color-subtle);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-lg);
}

/* Sections */
section {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid currentColor;
  opacity: 0.1;
}

section:first-of-type {
  border-top-color: var(--color-accent);
  opacity: 1;
}

.bio {
  border-top-color: var(--color-accent);
  opacity: 1;
}

.bio p {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}

.bio p:last-child {
  margin-bottom: 0;
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
  position: relative;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.bio a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.bio a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Social Links */
.links {
  border-top-color: var(--color-subtle);
  opacity: 1;
}

nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
}

.link-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-bg);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: -1;
}

.link-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--color-accent);
  color: var(--color-primary);
}

.link-card:hover::before {
  opacity: 0.1;
}

.link-card:active {
  transform: translate(0, 0);
  box-shadow: 2px 2px 0 var(--color-accent);
}

.link-card .icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
  flex-shrink: 0;
}

/* Footer */
footer {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-subtle);
  font-size: 0.9375rem;
}

footer p {
  margin-bottom: var(--space-sm);
  color: var(--color-subtle);
}

footer p:last-child {
  margin-bottom: 0;
}

.contact a,
.archive a {
  color: var(--color-primary);
  font-weight: 500;
}

.contact a:hover,
.archive a:hover {
  color: var(--color-accent);
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
  article {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  @keyframes slideIn {
    from {
      opacity: 0;
      transform: translateY(1rem);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Selection */
::selection {
  background: var(--color-accent);
  color: var(--color-surface);
}

::-moz-selection {
  background: var(--color-accent);
  color: var(--color-surface);
}