:root {
    /* Apple/iOS Glass Palette - Gold & Black Edition */
    --color-bg-mesh: radial-gradient(at 0% 0%, hsla(45, 100%, 20%, 0.4) 0, transparent 50%),
        radial-gradient(at 50% 100%, hsla(38, 80%, 30%, 0.3) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(50, 90%, 15%, 0.4) 0, transparent 50%);
    --color-bg-base: #050505;
    /* Dark mode base */

    --glass-surface: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.2);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-accent: #D4AF37;
    /* Metallic Gold */

    /* Typography */
    @import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600&display=swap');
    --font-main: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    /* Spacing & Shapes */
    --radius-lg: 24px;
    --radius-pill: 50px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
}

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

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    background-color: var(--color-bg-base);
    background-image: var(--color-bg-mesh);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Glass Mixin equivalent */
.glass {
    background: var(--glass-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Layout */
header {
    position: sticky;
    top: 20px;
    z-index: 100;
    margin: 0 auto;
    width: 90%;
    max-width: 1200px;
    border-radius: var(--radius-pill);
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Apply Glass Effect to Header */
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) 20px;
    width: 100%;
}

.hero {
    text-align: center;
    padding: 40px 0;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 600;
    background: -webkit-linear-gradient(#fff, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -1px;
}

.grid-container {
    display: grid;
    /* Default Mobile: Stacked */
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

/* Tablet & Desktop: Custom Layout */
@media (min-width: 900px) {
    .grid-container {
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-areas:
            "about about resume resume resume"
            /* 50/50 split spanning 6 columns is complex with 3 col grid, switching to 2 col grid base would be better or just flex */
        ;
        /* Let's use a 6-column grid for precise control */
        grid-template-columns: repeat(10, 1fr);
        grid-template-areas:
            "about about about about about resume resume resume resume resume"
            "apps apps apps links links links contact contact contact contact";
    }

    #about {
        grid-area: about;
    }

    #resume {
        grid-area: resume;
    }

    /* Row 2: 30% - 30% - 40% (since 30+30+30=90, giving Contact slightly more or exact split 3/3/4) */
    /* User asked for 30% 30% 30% but that leaves 10%. I'll do 3.3fr each spread over 10 cols: 3 cols, 3 cols, 4 cols */
    #apps {
        grid-area: apps;
    }

    #links {
        grid-area: links;
    }

    #contact {
        grid-area: contact;
    }
}

/* Components */
.card {
    background: var(--glass-surface);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    background: var(--glass-highlight);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Typography Overrides */
h2 {
    color: var(--text-primary);
    font-weight: 500;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
}

h3 {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 1.1rem;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

p {
    color: var(--text-secondary);
    font-weight: 300;
}

/* Utilities */
.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: var(--spacing-md);
    border: 2px solid var(--glass-border);
    float: left;
}

.btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 10px 24px;
    margin-top: var(--spacing-md);
    margin-right: var(--spacing-sm);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.link-list {
    list-style: none;
}

.link-list li {
    margin-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
}

.link-list li:last-child {
    border-bottom: none;
}

a {
    color: var(--text-accent);
    /* Active Apple Blue for links */
    text-decoration: none;
    font-weight: 400;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing-lg);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 40px;
}

/* Modal / Lightbox */
.light {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 98vw;
    height: auto;
    max-height: 98vh;
    max-width: none;
    background-color: var(--color-bg-base);
    background-image: var(--color-bg-mesh);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    z-index: 1002;
    overflow: auto;
    padding: 2.5% var(--spacing-md);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.fade {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1001;
}

.close {
    display: inline-block;
    float: right;
    text-align: center;
    margin-bottom: 0;
    margin-top: var(--spacing-md);
    font-size: 0.9rem;
    cursor: pointer;
}

.close:hover {
    color: var(--text-accent);
}

/* App Detail Pages Layout */
.app-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

@media (min-width: 900px) {
    .app-grid {
        grid-template-columns: 280px 1fr;
        align-items: start;
    }
}

.screenshot-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    justify-content: center;
    margin-top: var(--spacing-lg);
    border: none;
    box-shadow: none;
    background: transparent;
}

.screenshot-container img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease;
}

.screenshot-container img:hover {
    transform: scale(1.02);
}

/* Specific styling for app download badges/buttons */
.app-badge {
    display: inline-block;
    transition: transform 0.2s ease;
}

.app-badge:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    min-width: 200px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-lg);
    z-index: 1000;
    padding: 10px 0;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-content a {
    color: var(--text-secondary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.dropdown-content a:hover {
    background-color: var(--glass-highlight);
    color: var(--text-accent);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Scrollbar for dropdown */
.dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background-color: var(--glass-border);
    border-radius: 20px;
}