/* ==========================================================================
   Modern Apple-Inspired Dark Theme CSS
   ========================================================================== */

/* Variables */
:root {
    --bg-color: #000000;
    --bg-secondary: #111111;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent-color: #0a84ff;
    --accent-hover: #007aff;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(0, 0, 0, 0.7);
    --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

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

a:hover {
    color: var(--accent-hover);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 980px;
    /* Pillow shape */
    background-color: var(--text-primary);
    color: var(--bg-color);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 4px 14px 0 rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
    background-color: #ffffff;
    color: #000;
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.btn-accent {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(10, 132, 255, 0.3);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    color: white;
    box-shadow: 0 6px 20px rgba(10, 132, 255, 0.4);
}

/* Typography Classes */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #a5a5a5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 60px;
    font-weight: 400;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(10, 132, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    transform: translate(-50%, -50%);
    z-index: -1;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.04em;
    animation: fadeInDown 1s cubic-bezier(0.2, 0.8, 0.2, 1 forwards);
}

.hero p {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 40px;
    animation: fadeIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards;
    opacity: 0;
}

.hero-cta {
    display: flex;
    gap: 20px;
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s forwards;
    opacity: 0;
}

/* Sections */
.section {
    padding: 120px 0;
    position: relative;
}

/* Cards (Glassmorphism) */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.glass-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.15);
}

.glass-card:hover::before {
    opacity: 1;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Feature/App/Project Specifics */
.item-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin-bottom: 24px;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    /* Squircle approximation */
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.item-content h3 {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.item-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.features-list {
    list-style: none;
    margin-bottom: 24px;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.features-list i {
    color: var(--text-primary);
    margin-top: 4px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tech-tag {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: auto;
}

/* About Section Specifics */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--card-border);
    top: 0;
    bottom: 0;
    left: 20px;
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    left: 14px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--text-primary);
    box-shadow: 0 0 0 4px var(--bg-color);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--text-primary);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.timeline-date {
    display: inline-block;
    padding: 4px 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 99px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    nav ul {
        display: none;
        /* Add a hamburger menu for mobile if needed */
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .card-actions {
        flex-direction: column;
    }

    .card-actions .btn {
        width: 100%;
    }
}