/* --- Variables & Theme --- */
:root {
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --glass-bg: rgba(20, 20, 25, 0.4);
    --glass-card: rgba(255, 255, 255, 0.05);
    --glass-card-hover: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-highlight: rgba(255, 255, 255, 0.3);

    --accent-color: #007aff;
    /* macOS Blue */
    --accent-hover: #0056b3;

    --blur-amount: 25px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;

    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* --- Reset & Global --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Background Image --- */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    /* Slight scale to hide edges during blur/animations if added */
    filter: saturate(1.2) brightness(0.9);
}

/* --- Main Glass Container (The "App Window") --- */
.glass-container {
    width: 90%;
    max-width: 900px;
    height: 90vh;
    /* Fill most of screen */
    margin: 20px auto;

    /* macOS Window appearance */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px var(--glass-highlight);
    /* Inner highlight rim */

    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Contains scrollable content */
    position: relative;
    animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Top corner traffic light imitation could go here if requested, keeping it clean for now */

/* --- Header / Hero --- */
.hero-section {
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 0;
}

.avatar-container {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    padding: 3px;
    /* Space for ring */
    background: linear-gradient(135deg, var(--glass-highlight), rgba(255, 255, 255, 0));
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-bg);
}

.hero-text h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 5px;
    background: linear-gradient(180deg, #FFFFFF 0%, #E0E0E0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 15px;
}

/* --- Social Icons --- */
.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: var(--text-primary);
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    text-decoration: none;
}

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

/* --- Divider --- */
.glass-divider {
    height: 1px;
    border: none;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    width: 100%;
    flex-shrink: 0;
}

/* --- Action Bar (Buttons) --- */
.action-bar {
    padding: 20px 40px;
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.btn {
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    border: 1px solid var(--glass-border);
}

.btn-primary {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: var(--glass-card);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    border-color: var(--glass-highlight);
}

/* --- Scrollable Content Area --- */
.content-scroll {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 40px 40px 40px;

    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.content-scroll::-webkit-scrollbar {
    width: 6px;
}

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

.content-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.content-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* --- Content Sections --- */
.content-section {
    margin-bottom: 40px;
}

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

.content-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    font-size: 1.2rem;
    color: var(--glass-highlight);
}

/* --- Glass Cards --- */
.glass-card {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 25px;
    transition: var(--transition-smooth);
}

.glass-card p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.glass-card p:last-child {
    margin-bottom: 0;
}

.glass-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hover-lift:hover {
    background: var(--glass-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--glass-highlight);
}

/* --- Skills Tags --- */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 25px;
}

.skill-category h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: var(--transition-fast);
}

.tag:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.sm-tag {
    padding: 4px 10px;
    font-size: 0.75rem;
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.project-link {
    color: var(--text-primary);
    font-size: 1.2rem;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.project-link:hover {
    opacity: 1;
    transform: scale(1.1);
}

.project-tags {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-desc {
    margin-bottom: 20px !important;
}

.project-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-highlights li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.project-highlights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--glass-highlight);
    font-weight: bold;
}

/* --- Footer --- */
.footer {
    padding: 15px 40px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Animations --- */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Staggered load effect for content */
.content-section {
    animation: fadeUpIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.content-section:nth-child(1) {
    animation-delay: 0.2s;
}

.content-section:nth-child(2) {
    animation-delay: 0.3s;
}

@keyframes fadeUpIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Media Queries (Responsiveness) --- */
@media (max-width: 768px) {
    .glass-container {
        width: 100%;
        height: auto;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
        border: none;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px 20px 20px;
        gap: 15px;
    }

    .social-links {
        justify-content: center;
    }

    .action-bar {
        font-size: 0.8rem;
        flex-direction: column;
        padding: 20px;
        width: 100%;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }

    .content-scroll {
        padding: 20px;
    }

    .skills-container {
        flex-direction: column;
        gap: 20px;
    }
}