/* ============================================
   CSS RESET & BASE
   ============================================ */

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

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */

:root {
    --color-text: #e5e5e5;
    --color-text-secondary: #999;
    --color-bg: #111;
    --color-link: #e5e5e5;
    --color-link-hover: #999;

    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-size-base: 17px;
    --font-size-small: 15px;
    --font-size-name: 20px;
    --line-height: 1.6;

    --max-width: 680px;
    --padding-x: 24px;
    --padding-y: 48px;
}

/* ============================================
   BASE STYLES
   ============================================ */

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

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

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: var(--max-width);
    margin: 0;
    padding: 72px var(--padding-x) var(--padding-y) 96px;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
    margin-bottom: 48px;
}

.site-name {
    font-size: var(--font-size-name);
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.site-name::after {
    display: none;
}

.site-name:hover {
    color: var(--color-link-hover);
}

/* ============================================
   SECTIONS
   ============================================ */

section {
    margin-bottom: 48px;
}

section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
    text-transform: lowercase;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

p {
    margin-bottom: 24px;
}

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

ul {
    margin-bottom: 16px;
    padding-left: 20px;
}

li {
    margin-bottom: 20px;
}

li:last-child {
    margin-bottom: 0;
}

li p {
    margin-bottom: 0;
}

/* ============================================
   LINKS
   ============================================ */

a {
    color: var(--color-link);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    text-decoration-color: var(--color-text-secondary);
    position: relative;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--color-link);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

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

a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
    background-color: var(--color-link-hover);
}

a:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

/* ============================================
   CONTACT LIST
   ============================================ */

.contact-list {
    list-style: none;
    padding-left: 0;
}

.contact-list li {
    margin-bottom: 8px;
}

.contact-list li:last-child {
    margin-bottom: 0;
}

.email-link {
    transition: opacity 0.2s ease;
}

.email-link:hover {
    opacity: 0.7;
}

/* ============================================
   SKIP LINK (ACCESSIBILITY)
   ============================================ */

.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-bg);
    color: var(--color-text);
    padding: 12px 16px;
    z-index: 1000;
}

.skip-to-content:focus {
    top: 0;
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   MOBILE ADJUSTMENTS
   ============================================ */

@media (max-width: 600px) {
    :root {
        --padding-x: 20px;
        --padding-y: 40px;
        --font-size-base: 16px;
    }

    .container {
        padding: 48px var(--padding-x) var(--padding-y) var(--padding-x);
    }

    .theme-toggle {
        top: 16px;
        right: 16px;
    }
}
