/* ========================================
   CSS Variables for Theme
   ======================================== */
:root {
    --bg-color: #FFFFFF;
    --text-color: #000000;
    --accent-color: #000000;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --bg-color: #000000;
    --text-color: #FFFFFF;
    --accent-color: #FFFFFF;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    line-height: 1.6;
    min-height: 100vh;
    scroll-behavior: smooth;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    z-index: 1000;
    transition: background-color var(--transition-speed);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: opacity var(--transition-speed);
    position: relative;
}

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

.nav-link.active {
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--text-color);
}

/* ========================================
   Theme Toggle Button
   ======================================== */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border: 3px solid var(--text-color);
    background: var(--bg-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-speed);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.theme-toggle:active {
    transform: scale(0.95);
}

[data-theme="dark"] .theme-toggle {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .theme-toggle:hover {
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.15);
}

.theme-icon {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Light dot icon (always visible) */
.theme-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-color);
    transition: all var(--transition-speed);
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 400;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
}

.highlight {
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.typewriter::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.subtle {
    opacity: 0.7;
    font-style: italic;
}

/* ========================================
   Status Section
   ======================================== */
.status-container {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.status-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-group-title {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    text-align: center;
}

.status-group-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-section {
    padding: 2rem;
    border: 2px solid var(--text-color);
    text-align: left;
    position: relative;
}

.status-badge {
    position: absolute;
    top: -12px;
    left: 1.5rem;
    background-color: var(--bg-color);
    padding: 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        color: var(--text-color);
    }
    50% {
        color: rgba(0, 0, 0, 0.4);
    }
}

[data-theme="dark"] .status-badge {
    animation: pulse-badge-dark 2s ease-in-out infinite;
}

@keyframes pulse-badge-dark {
    0%, 100% {
        color: var(--text-color);
    }
    50% {
        color: rgba(255, 255, 255, 0.4);
    }
}

.status-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.status-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

/* Dark mode support for status icon */
[data-theme="dark"] .status-icon {
    filter: invert(1);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-text {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

/* ========================================
   About Page
   ======================================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 3rem;
}

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

.about-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

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

.about-link {
    color: var(--text-color);
    text-decoration: underline;
    font-weight: 600;
    transition: opacity var(--transition-speed);
}

.about-link:hover {
    opacity: 0.6;
}

.about-links-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.separator {
    opacity: 0.5;
}

/* ========================================
   Stack Page
   ======================================== */
.stack-grid {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.stack-category {
    border: 2px solid var(--text-color);
    padding: 1.5rem;
    transition: all var(--transition-speed);
}

.stack-category:hover {
    transform: translateY(-2px);
}

.stack-category-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--text-color);
}

.stack-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stack-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stack-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

.stack-value {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.stack-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stack-list li {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
    padding-left: 1.25rem;
    position: relative;
}

.stack-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1;
}

.stack-list a {
    color: var(--text-color);
    text-decoration: underline;
    font-weight: 600;
    transition: opacity var(--transition-speed);
}

.stack-list a:hover {
    opacity: 0.6;
}

.fav-badge {
    font-size: 0.85em;
    opacity: 0.7;
    font-style: italic;
    font-weight: 400;
}

/* ========================================
   Page Content
   ======================================== */
.page-content {
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 4rem;
}

.page-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    text-align: center;
}

.page-subtitle {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.7;
    margin-bottom: 3rem;
}

.page-body {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ========================================
   Links Page
   ======================================== */
.links-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border: 2px solid var(--text-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: all var(--transition-speed);
    cursor: pointer;
    min-height: 70px;
}

.link-card:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    transform: translateX(5px);
}

.link-card:active {
    transform: translateX(5px) scale(0.98);
}

.link-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.link-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    transition: all var(--transition-speed);
}

/* SVG icons use filter for proper light/dark mode support */
/* Light mode: icons are black, no filter needed */
/* Dark mode: icons need to be inverted to white */
[data-theme="dark"] .link-icon {
    filter: invert(1);
}

/* On hover, invert the icon color */
.link-card:hover .link-icon {
    filter: invert(1);
}

/* On hover in dark mode, double invert = back to original */
[data-theme="dark"] .link-card:hover .link-icon {
    filter: invert(0);
}

.link-title {
    font-weight: 500;
}

.link-arrow {
    font-size: 1.5rem;
    transition: transform var(--transition-speed);
    flex-shrink: 0;
}

.link-card:hover .link-arrow {
    transform: translateX(5px);
}

/* ========================================
   Contact Page
   ======================================== */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 2rem;
}

.contact-text {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.contact-email {
    display: inline-block;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-color);
    text-decoration: underline;
    transition: opacity var(--transition-speed);
}

.contact-email:hover {
    opacity: 0.6;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .theme-toggle {
        width: 55px;
        height: 55px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .page-content {
        padding-top: 100px;
    }

    .link-card {
        padding: 1.25rem 1.5rem;
        font-size: 1.1rem;
    }

    .link-icon {
        width: 26px;
        height: 26px;
    }

    .status-container {
        margin-top: 3rem;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1.5rem;
    }

    .status-section {
        padding: 1.5rem;
    }

    .status-group-title {
        font-size: 1rem;
    }

    .status-badge {
        left: 1rem;
        font-size: 0.7rem;
    }

    .status-icon {
        width: 42px;
        height: 42px;
    }

    .status-text {
        font-size: 1.15rem;
    }

    .about-heading {
        font-size: 1.3rem;
    }

    .about-content p {
        font-size: 1rem;
    }

    .stack-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stack-category {
        padding: 1.25rem;
    }

    .stack-category-title {
        font-size: 1rem;
    }

    .stack-value {
        font-size: 0.95rem;
    }

    .stack-list li {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .theme-toggle {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
    }

    .theme-icon::before {
        width: 14px;
        height: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-content {
        padding-top: 140px;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .link-card {
        padding: 1.25rem 1.25rem;
        font-size: 1rem;
        min-height: 60px;
    }

    .link-content {
        gap: 0.75rem;
    }

    .link-icon {
        width: 24px;
        height: 24px;
    }

    .link-arrow {
        font-size: 1.3rem;
    }

    .status-container {
        margin-top: 2.5rem;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .status-section {
        padding: 1.25rem;
    }

    .status-group-title {
        font-size: 0.95rem;
    }

    .status-badge {
        left: 0.75rem;
        font-size: 0.65rem;
        padding: 0 0.5rem;
    }

    .status-content {
        gap: 1rem;
    }

    .status-icon {
        width: 36px;
        height: 36px;
    }

    .status-text {
        font-size: 1rem;
    }

    .about-section {
        margin-bottom: 2.5rem;
    }

    .about-heading {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .about-content p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .about-links-row {
        gap: 0.75rem;
    }

    .stack-grid {
        gap: 1.25rem;
    }

    .stack-category {
        padding: 1rem;
    }

    .stack-category-title {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .stack-items {
        gap: 0.85rem;
    }

    .stack-label {
        font-size: 0.75rem;
    }

    .stack-value {
        font-size: 0.9rem;
    }

    .stack-list {
        gap: 0.4rem;
    }

    .stack-list li {
        font-size: 0.9rem;
        padding-left: 1rem;
    }

    .stack-list li::before {
        font-size: 1rem;
    }
}
