/* =============================================
   CSS Variables & Theme Configuration
============================================= */
:root {
    /* Dark Theme (default) */
    --bg-color: #1f1d1a;
    --bg-pattern: rgba(212, 165, 80, 0.04);
    --text-primary: #ffffff;
    --text-secondary: #a8a8a8;
    --text-muted: #6a6a6a;
    --accent: #d4a550;
    --accent-hover: #e3b665;
    --divider: #3a3531;
    --surface: #2a2724;
    --surface-hover: #34302c;
    --shadow: rgba(0, 0, 0, 0.3);

    /* Spacing */
    --space-xs: clamp(0.5rem, 1vw, 0.75rem);
    --space-sm: clamp(0.75rem, 1.5vw, 1rem);
    --space-md: clamp(1rem, 2vw, 1.5rem);
    --space-lg: clamp(1.5rem, 3vw, 2.5rem);
    --space-xl: clamp(2rem, 4vw, 3.5rem);

    /* Font Sizes */
    --fs-xs: clamp(0.75rem, 1.5vw, 0.875rem);
    --fs-sm: clamp(0.813rem, 1.6vw, 0.938rem);
    --fs-base: clamp(0.875rem, 1.8vw, 1rem);
    --fs-title: clamp(1.5rem, 5vw, 2.75rem);

    /* Layout */
    --container-max: 900px;
    --logo-size: clamp(140px, 22vw, 200px);
    --transition: 0.3s ease;
}

[data-theme="light"] {
    --bg-color: #f5f3ee;
    --bg-pattern: rgba(184, 137, 61, 0.06);
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #999999;
    --accent: #b8893d;
    --accent-hover: #a07730;
    --divider: #d0cfc8;
    --surface: #e8e6df;
    --surface-hover: #ddd9cf;
    --shadow: rgba(0, 0, 0, 0.08);
}

/* =============================================
   Reset & Base
============================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    font-weight: 300;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    transition: background var(--transition), color var(--transition);
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 200%;
    height: 1px;
    background: var(--bg-pattern);
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: 38%;
    left: -50%;
    transform: rotate(-6deg);
}

body::after {
    bottom: 28%;
    right: -50%;
    transform: rotate(-6deg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* =============================================
   Theme Toggle
============================================= */
.theme-toggle {
    position: fixed;
    top: var(--space-md);
    right: var(--space-md);
    width: clamp(40px, 6vw, 46px);
    height: clamp(40px, 6vw, 46px);
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-base);
    z-index: 100;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: var(--surface-hover);
    transform: scale(1.08) rotate(15deg);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* =============================================
   Page Layout - Full Width Centering
============================================= */
.page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-md);
    position: relative;
    z-index: 1;
}

/* =============================================
   Main Content - Truly Centered
============================================= */
.content {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--space-md);
}

/* =============================================
   Logo - Centered
============================================= */
.logo {
    width: 100%;
    margin-bottom: var(--space-xl);
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-img {
    width: var(--logo-size);
    height: auto;
    margin: 0 auto;
}

.logo-light {
    display: none;
}

[data-theme="light"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: block;
}

/* =============================================
   Title - Centered
============================================= */
.title {
    width: 100%;
    font-size: var(--fs-title);
    font-weight: 300;
    letter-spacing: clamp(4px, 1.5vw, 14px);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    text-align: center;
    /* Compensate for letter-spacing pushing text right */
    text-indent: clamp(4px, 1.5vw, 14px);
}

/* =============================================
   Description - Centered
============================================= */
.description {
    width: 100%;
    max-width: 460px;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.75;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-lg);
    padding: 0 var(--space-sm);
    text-align: center;
}

/* =============================================
   Divider - Centered
============================================= */
.divider {
    width: clamp(140px, 25vw, 200px);
    height: 1px;
    background: var(--divider);
    margin: var(--space-md) auto var(--space-lg);
    position: relative;
}

.divider-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* =============================================
   Contact List - Flex with Tight Spacing
   Centered using flexbox with even gaps
============================================= */
.contact-list {
    width: 100%;
    margin: 0 auto var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2rem);
    padding: 0;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: var(--fs-xs);
    color: var(--text-secondary);
    white-space: nowrap;
}

.contact-item i {
    color: var(--accent);
    font-size: var(--fs-sm);
    flex-shrink: 0;
}

.contact-item a {
    transition: color var(--transition);
}

.contact-item a:hover {
    color: var(--accent);
}

/* =============================================
   Social Media - Centered
============================================= */
.social-list {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    margin: var(--space-xs) auto 0;
    padding: 0;
}

.social-list li {
    display: flex;
}

.social-list a {
    width: clamp(36px, 5vw, 42px);
    height: clamp(36px, 5vw, 42px);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-sm);
    transition: all var(--transition);
}

.social-list a:hover {
    background: var(--accent);
    color: #ffffff;
    transform: translateY(-3px);
}

.social-list a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* =============================================
   Footer - Centered
============================================= */
.footer {
    width: 100%;
    text-align: center;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    padding-top: var(--space-lg);
}

/* =============================================
   Mobile (600px and below)
============================================= */
@media (max-width: 600px) {

    .contact-list {
        flex-direction: column;
        gap: 0.875rem;
    }

    .contact-item {
        white-space: normal;
        text-align: center;
    }

}

/* =============================================
   Small Mobile (480px and below)
============================================= */
@media (max-width: 480px) {

    .page {
        padding: var(--space-md) var(--space-sm);
    }

    .content {
        padding-top: var(--space-sm);
    }

    .logo {
        margin-bottom: var(--space-lg);
    }

    .description {
        max-width: 100%;
    }

}

/* =============================================
   Landscape Mobile
============================================= */
@media (max-height: 600px) and (orientation: landscape) {

    .page {
        padding: var(--space-md);
    }

    .logo {
        margin-bottom: var(--space-md);
    }

    .description {
        margin-bottom: var(--space-md);
    }

    .divider {
        margin: var(--space-sm) auto;
    }

}

/* =============================================
   Large Screens
============================================= */
@media (min-width: 1400px) {

    :root {
        --container-max: 1000px;
        --logo-size: 220px;
    }

}

/* =============================================
   Reduced Motion
============================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

}

/* =============================================
   Print
============================================= */
@media print {

    .theme-toggle,
    .social-list {
        display: none;
    }

    body {
        background: #ffffff;
        color: #000000;
    }

}