:root {
    /* Color Palette - Premium Dark */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --text-primary: #f5f5f7;
    /* Apple-ish off-white */
    --text-secondary: #86868b;
    /* Apple-ish gray */
    --accent-color: #2997ff;
    /* Apple Blue */
    --accent-glow: rgba(41, 151, 255, 0.4);

    /* Fonts */
    --font-heading: 'Fira Code', monospace;
    --font-body: 'Fira Code', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Typography */
.big-title {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: linear-gradient(180deg, #fff, #b0b0b0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
}

.accent {
    color: var(--accent-color);
}

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

.full-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.section {
    padding: 8rem 0;
}

/* Header - Floating Bottom Pill */
header {
    position: fixed;
    bottom: 20px;
    top: auto;
    /* Reset top */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

header:hover {
    background: rgba(30, 30, 30, 0.9);
    transform: translateX(-50%) scale(1.02);
}

.navbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
}

.logo {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    transform: none;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    margin-bottom: 0;
}

.nav-links {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    transform: none;
}

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

.hamburger {
    display: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.4;
}

/* Sticky Scroll Effect - DISABLED for better visibility */
.sticky-section {
    position: relative;
    /* Changed from sticky */
    top: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.85);
    /* Semi-transparent */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.5);
}

/* Projects Section - Fix Visibility & Overlap */
.projects-section {
    z-index: 2;
    background: rgba(10, 10, 10, 0.85);
    /* Lower opacity for background visibility */
    /* Remove sticky to ensure full scrollability if content is long */
    position: relative;
    min-height: auto;
    /* Allow it to grow */
    padding-bottom: 10rem;
}

.contact-section {
    z-index: 3;
    background: rgba(5, 5, 5, 0.85);
    /* Lower opacity for background visibility */
}

/* Hero Section */
.hero-section {
    align-items: center;
    text-align: center;
    padding-top: 100px;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/hero-bg.png') no-repeat center center/cover;
    opacity: 0.6;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
    max-width: 1200px;
    width: 100%;
    padding: 0 2rem;
}

.hero-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-text-side {
    flex: 1;
}

.hero-visual-side {
    flex: 1;
    display: flex;
    justify-content: center;
}

.greeting {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.big-title {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

/* Code Terminal */
.code-terminal {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    font-family: 'Fira Code', monospace;
}

.terminal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-body {
    color: #a9b7c6;
    font-size: 1rem;
    line-height: 1.6;
    min-height: 60px;
}

.cursor {
    display: inline-block;
    width: 8px;
    background: var(--accent-color);
    animation: blink 1s infinite;
    margin-left: 4px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    cursor: pointer;
    animation: bounce 2s infinite;
    z-index: 10;
}

.scroll-indicator span {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Education Section */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.edu-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

.edu-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.edu-card .year {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.edu-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.edu-card .institution {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.edu-card .grade {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Skills Section */
.skills-category {
    margin-bottom: 3rem;
}

.skills-category h3 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tags span {
    background: rgba(41, 151, 255, 0.1);
    color: var(--accent-color);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1px solid rgba(41, 151, 255, 0.2);
    transition: all 0.3s ease;
}

.skill-tags span:hover {
    background: var(--accent-color);
    color: #fff;
    transform: scale(1.05);
}

/* My Work (Apps) Section */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.app-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
}

.app-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.app-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.app-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Story Section */
.story-section {
    background: #000;
    text-align: center;
}

.story-content {
    max-width: 800px;
    margin: 0 auto;
}

.story-text {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 2rem 0;
    color: var(--text-primary);
}

.story-breakdown {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin: 4rem 0;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.number {
    font-size: 6rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent-color);
    text-shadow: 0 0 30px var(--accent-glow);
}

.letter {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-top: -10px;
}

.story-subtext {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Projects Section */
.projects-section {
    background: var(--bg-secondary);
}

.project-showcase {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 10rem;
}

.project-showcase.reverse {
    flex-direction: row-reverse;
}

.project-info-side {
    flex: 1;
}

.project-info-side h3 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--text-primary);
}

.project-info-side p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.project-visual-side {
    flex: 1.5;
    height: 500px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.visual-content {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.1);
    transition: transform 0.5s;
}

.project-showcase:hover .visual-content {
    transform: scale(1.1);
    color: rgba(255, 255, 255, 0.3);
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tags span {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    color: var(--text-primary);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Contact Section */
.contact-minimal {
    text-align: center;
}

.email-link {
    font-size: 4rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
    display: block;
    margin-bottom: 3rem;
}

.email-link:hover {
    color: var(--accent-color);
}

.social-icons-large {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.social-icons-large a {
    font-size: 2.5rem;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.social-icons-large a:hover {
    color: var(--text-primary);
    transform: translateY(-5px);
}

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

/* Cursor Glow */
.cursor-glow {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(41, 151, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    position: fixed;
    top: -300px;
    left: -300px;
    pointer-events: none;
    z-index: 0;
    transform: translate(0, 0);
    transition: transform 0.1s ease;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    /* Apple-like ease */
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {

    /* Navbar */
    header {
        width: 90%;
        padding: 0.8rem 1rem;
        bottom: 10px;
    }

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

    .nav-links {
        display: flex;
        gap: 1.5rem;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        /* For scrollbar */
        -webkit-overflow-scrolling: touch;
        width: 100%;
        justify-content: flex-start;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .logo,
    .hamburger {
        display: none;
        /* Hide logo/hamburger on mobile to save space for links */
    }

    /* Typography */
    .big-title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .email-link {
        font-size: 1.5rem;
        word-break: break-all;
    }

    /* Layouts */
    .project-showcase,
    .project-showcase.reverse {
        flex-direction: column !important;
        gap: 2rem;
        text-align: center;
    }

    .project-info-side h3 {
        font-size: 2rem;
    }

    .project-visual-side {
        width: 100%;
        height: 250px;
    }

    .tags {
        justify-content: center;
        flex-wrap: wrap;
    }

    .btn-link {
        justify-content: center;
    }

    /* Grids */
    .education-grid,
    .apps-grid {
        grid-template-columns: 1fr;
    }

    /* Story */
    .story-breakdown {
        gap: 2rem;
    }

    .number {
        font-size: 4rem;
    }

    /* Hero */
    .hero-section {
        padding-top: 80px;
    }

    .hero-grid {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .hero-text-side {
        width: 100%;
    }

    .hero-visual-side {
        width: 100%;
    }

    .subtitle {
        margin: 0 auto 2rem;
    }

    .code-terminal {
        margin: 0 auto;
        padding: 1rem;
    }

    .terminal-body {
        font-size: 0.85rem;
    }
}