/* ============================================
   crystaria - Personal Website
   Global Styles + Dark/Light Mode
   ============================================ */

/* Font Faces */
@font-face {
    font-family: 'New Romantics';
    src: url('../fonts/New_Romantics/ROMANTIC.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Inconsolata LGC';
    src: url('../fonts/InconsolataLGC/InconsolataLGCNerdFont-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Inconsolata LGC';
    src: url('../fonts/InconsolataLGC/InconsolataLGCNerdFont-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* CSS Variables - Dark Mode (Default) - HIGH CONTRAST */
:root {
    --bg-primary: #0d0d1a;
    --bg-secondary: #0d0d1aeb;
    --bg-card: #141423f2;
    --text-primary: #ffffff;
    --text-secondary: #c0c0c0;
    --accent: #bea9ff;
    --accent-hover: #bea9ff;
    --accent-glow: rgba(167, 139, 250, 0.5);
    --border: #bea9ff;
    --link: #e0b0ff;
    --link-hover: #f0d0ff;
}

/* Light Mode - HIGH CONTRAST */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --bg-card: rgba(255, 255, 255, 0.98);
    --text-primary: #0d0d1a;
    --text-secondary: #3a3a5a;
    --accent: #6d28d9;
    --accent-hover: #4c1d95;
    --accent-glow: rgba(109, 40, 217, 0.3);
    --border: #c0c0d0;
    --link: #6d28d9;
    --link-hover: #4c1d95;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inconsolata LGC', 'Consolas', 'Monaco', monospace;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image: url('../images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Overlay for readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    z-index: -1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inconsolata LGC', monospace;
    font-weight: normal;
    margin-bottom: 1rem;
}

.title-main {
    font-family: 'New Romantics', serif;
    font-size: 4rem;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
    letter-spacing: 0.2em;
    word-spacing: 0.2em;
    margin-bottom: 0;
}

.tagline {
    font-family: 'Inconsolata LGC', monospace;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 0;
    letter-spacing: 0.05em;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Layout */
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Header - Nav centered, Toggle theme on right */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

header .theme-toggle {
    position: absolute;
    right: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 36px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.1);
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav a {
    color: var(--text-primary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.25rem;
    margin: 0 0.5rem;
    border-bottom: 2px solid transparent;
    transition: all 0.25s ease;
}

nav a:hover,
nav a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    text-decoration: none;
}

/* Nav Home with Logo */
.nav-home {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-logo {
    height: 24px;
    width: auto;
}

/* Theme Toggle - Fixed Size */
.theme-toggle {
    background: none;
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 90px;
    text-align: center;
}

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

/* Main Content */
main {
    margin-top: 56px;
    min-height: calc(100vh - 56px);
    padding: 2rem;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
    text-align: center;
}

/* Cards / Sections */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-glow);
}

.card h2 {
    color: var(--accent);
    /* border-bottom: 1px solid var(--border); */
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 100px #0000001a;
}

/* Skills Badges */
.skills-section {
    margin-bottom: 2rem;
}

.skills-section h3 {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.badge:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Social Links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow);
    text-decoration: none;
}

/* 88x31 Buttons */
.buttons-88x31 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.buttons-88x31 img {
    width: 88px;
    height: 31px;
    image-rendering: pixelated;
}

.separator-centered {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 1rem 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    /* border-top: 1px solid var(--border); */
    background: var(--bg-card);
}

footer p {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .title-main {
        font-size: 2.5rem;
    }

    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    main {
        margin-top: 140px;
    }

    .container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    nav a {
        font-size: 0.8rem;
        padding: 0.25rem;
    }

    .social-links {
        flex-direction: column;
    }
}