/* Apple-style "Pro" Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #f5f5f7;
    /* Apple Light Gray Background */
    --card-bg: #ffffff;
    --text-primary: #1d1d1f;
    /* Almost Black */
    --text-secondary: #86868b;
    --accent-color: #0071e3;
    /* Slightly darker Apple Blue for light mode */
    --hover-bg: #fbfbfd;
    --border-radius: 24px;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    /* Soft shadows are key for light mode */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

.no-scroll {
    overflow: hidden;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.container {
    max-width: 1024px;
    /* Apple's content width is often tighter */
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.7);
    /* White glass */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Lighter border */
    padding: 18px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 1;
}

nav ul {
    display: flex;
    gap: 28px;
    list-style: none;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    /* Increased top padding */
}

.hero h1 {
    font-size: 5rem;
    /* Massive Apple-style headers */
    line-height: 1.1;
    background: linear-gradient(180deg, #1d1d1f 0%, #434344 100%);
    /* Check this contrast */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 32px;
    /* Increased from 24px */
    max-width: 900px;
}

.hero span {
    display: block;
    font-size: 1.6rem;
    color: var(--accent-color);
    margin-top: 24px;
    /* More space */
    margin-bottom: 24px;
    /* More space */
    font-weight: 500;
    -webkit-text-fill-color: var(--accent-color);
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 56px;
    /* Increased from 40px */
    font-weight: 400;
    line-height: 1.6;
}

/* Profile Photo */
.profile-photo-container {
    margin-bottom: 56px;
    /* Increased from 24px */
    display: inline-block;
    position: relative;
}

.profile-photo {
    width: 220px;
    /* Increased by ~20% */
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    /* Soft, deep shadow */
    border: 4px solid #fff;
    /* White border for clean look */
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.profile-photo:hover {
    transform: scale(1.05) rotate(2deg);
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    padding: 12px 28px;
    border-radius: 980px;
    /* Fully rounded pill */
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.2s ease, opacity 0.2s;
    display: inline-block;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

/* Section Common */
section {
    padding: 60px 0;
    /* Reduced from 120px to 60px */
}

.section-title {
    font-size: 3.5rem;
    margin-bottom: 48px;
    /* Reduced from 80px to 48px */
    text-align: center;
    color: var(--text-primary);
}

/* Cards - Bento Grid Style */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.card:hover {
    background-color: var(--hover-bg);
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    /* Increased from 12px for better separation */
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* About Section */
.about-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    /* Inherits standard card bg (white) */
}

/* Contact */
.contact-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background-color: var(--card-bg);
    border-radius: 980px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.contact-link:hover {
    background-color: #000;
    color: #fff;
    /* Invert on hover for premium feel */
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Footer */
footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #fff;
    margin-top: 80px;
}

footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Burger Button (Hidden on Desktop) */
.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    z-index: 200;
}

.burger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Burger Animation */
.burger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}


/* Mobile - "Pro" Adaptation */
@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }

    /* Stack Header properly */
    .header-inner {
        flex-direction: row;
        /* Keep logo and burger side-by-side */
        justify-content: space-between;
        align-items: center;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .logo {
        font-size: 1.1rem;
        z-index: 200;
        /* Above menu overlay */
    }

    .burger-btn {
        display: flex;
    }

    /* Mobile Menu Overlay */
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 150;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        pointer-events: none;
    }

    nav.active {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 32px;
        text-align: center;
    }

    nav a {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--text-primary);
    }

    /* Reset Hero padding since nav is overlay */
    .hero {
        padding-top: 40px;
        min-height: auto;
        padding-bottom: 60px;
    }

    .profile-photo {
        width: 160px;
        height: 160px;
        border-width: 3px;
    }

    .hero h1 {
        font-size: 2.8rem;
        margin-bottom: 20px;
    }

    .hero span {
        font-size: 1.25rem;
        margin-top: 16px;
        margin-bottom: 16px;
    }

    .hero p {
        font-size: 1.15rem;
        margin-bottom: 40px;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
        padding: 16px;
    }

    /* Grid Adjustments */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }

    .card {
        padding: 24px;
    }

    .card h3 {
        font-size: 1.5rem;
    }

    /* Tighter Lists */
    .tech-list li {
        padding: 8px 0;
        font-size: 0.95rem;
    }

    /* Accordion mobile tweaks */
    .accordion-header {
        padding: 20px 24px;
        font-size: 1.1rem;
    }

    .accordion-body {
        padding: 0 24px 24px 24px;
        font-size: 0.95rem;
        /* Reduced from 1rem */
        line-height: 1.5;
        color: var(--text-secondary);
    }

    /* Full width contacts */
    .contact-container {
        flex-direction: column;
        gap: 12px;
    }
}

/* Accordion Styles */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.accordion-item {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.3s ease;
}

.accordion-item:hover {
    box-shadow: var(--shadow-md);
}

.accordion-header {
    width: 100%;
    padding: 24px 32px;
    background: none;
    border: none;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.accordion-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header::after {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    opacity: 0;
}

.accordion-item.active .accordion-content {
    max-height: 3000px;
    /* Increased from 1000px to prevent clipping on mobile */
    opacity: 1;
}

.accordion-body {
    padding: 0 32px 32px 32px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.05rem;
    white-space: pre-line;
    /* Handle newlines in text */
}

/* Projects Grid Overrides */
.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-desc {
    color: var(--text-secondary);
    flex-grow: 1;
}

.project-tech {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-top: 12px;
}

/* Tech List Styles */
.tech-list {
    list-style: none;
    margin-top: 8px;
    /* Adjustment */
}

.tech-list li {
    padding: 10px 0;
    /* Increased from 6px */
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    font-size: 1rem;
    /* Specific size for clarity */
}

.tech-list li:last-child {
    border-bottom: none;
}