:root {
    /* Navy & Teal Premium Scheme */
    --bg-color: #0A192F;
    --card-bg: rgba(17, 34, 64, 0.7);
    --accent-color: #64FFDA;
    --accent-glow: rgba(100, 255, 218, 0.15);
    --text-primary: #CCD6F6;
    --text-secondary: #8892B0;
    --border-color: rgba(100, 255, 218, 0.1);
    --glass-bg: rgba(2, 12, 27, 0.7);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: none;
}

@media (pointer: coarse) {
    body { cursor: auto; }
    .cursor, .cursor-dot { display: none; }
}

/* Custom Cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease-out, width 0.3s ease, height 0.3s ease, background 0.3s ease;
    transform: translate(-50%, -50%);
}

.cursor-dot {
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

.cursor-hover {
    width: 60px;
    height: 60px;
    background: var(--accent-glow);
    border-color: transparent;
}

/* Background Animation */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(120px);
    opacity: 0.5;
}

.blob {
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    background: var(--accent-glow);
    animation: move 20s infinite alternate;
}

.blob-1 { top: -10%; left: -10%; background: rgba(0, 245, 255, 0.1); }
.blob-2 { bottom: -10%; right: -10%; background: rgba(124, 58, 237, 0.1); }
.blob-3 { top: 40%; left: 30%; background: rgba(59, 130, 246, 0.08); }

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(10%, 10%) scale(1.1); }
}

/* Layout Wrapper */
#root {
    min-height: 100vh;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;
    height: 90px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 200;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(10, 25, 47, 0.85);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.logo {
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    display: inline-block;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo:hover {
    color: #fff;
}


.top-nav nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links-top {
    display: flex;
    list-style: none;
    gap: 2rem;
    counter-reset: nav-counter;
}

.nav-links-top li {
    counter-increment: nav-counter;
}

.nav-links-top a {
    position: relative;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-body);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.nav-links-top a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links-top a:hover {
    color: var(--accent-color);
}

.nav-links-top a:hover::after {
    width: 100%;
}

.resume-btn {
    color: var(--accent-color);
    background-color: transparent;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    font-family: var(--font-body);
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 1px;
}

.resume-btn:hover {
    background-color: var(--accent-glow);
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Nav */
.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: min(75vw, 320px);
    height: 100vh;
    background: rgba(10, 25, 47, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    z-index: 150;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-nav-drawer.open {
    transform: translateX(0);
}

.mobile-nav-drawer ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    counter-reset: mobile-nav-counter;
}

.mobile-nav-drawer ol li {
    counter-increment: mobile-nav-counter;
}

.mobile-nav-drawer ol li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.mobile-nav-drawer ol li a::before {
    content: counter(mobile-nav-counter, decimal-leading-zero) ".";
    color: var(--accent-color);
    font-size: 0.75rem;
}

.mobile-nav-drawer ol li a:hover {
    color: var(--accent-color);
}

.mobile-nav-drawer .resume-btn {
    font-size: 0.95rem;
    padding: 0.75rem 2rem;
}

/* Overlay when drawer is open */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 12, 27, 0.6);
    z-index: 140;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Fixed Side Elements */
.side-element {
    position: fixed;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.left-sidebar {
    left: 40px;
    right: auto;
}

.right-sidebar {
    right: 40px;
    left: auto;
}

.social-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.social-links-vertical::after,
.email-link::after {
    content: "";
    width: 1px;
    height: 90px;
    background-color: var(--text-secondary);
    margin-top: 1.5rem;
}

.social-links-vertical a {
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-links-vertical a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.email-link {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.email-link a {
    writing-mode: vertical-rl;
    text-decoration: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    transition: var(--transition);
}

.email-link a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Main Content */
.main-content {
    margin: 0 auto;
    width: 100%;
    max-width: 1000px;
    padding: 0 100px;
}

.content-section {
    padding: 100px 0;
    max-width: 800px;
    margin: 0 auto;
}

/* Typography & General */
.highlight, .highlight a {
    color: var(--accent-color);
    text-decoration: none;
}
.highlight a:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: 0;
}

.hero-intro {
    color: var(--accent-color);
    font-family: var(--font-body);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin: 0;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.1;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.hero-desc {
    max-width: 540px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.hero-btn {
    padding: 1.25rem 1.75rem;
    font-size: 0.9rem;
    align-self: flex-start;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.btn-primary:hover {
    background: var(--accent-glow);
}

/* Section Headings */
.numbered-heading {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    white-space: nowrap;
}

.content-section:nth-of-type(1) .numbered-heading::before { content: "01. "; }
.content-section:nth-of-type(2) .numbered-heading::before { content: "02. "; }
.content-section:nth-of-type(3) .numbered-heading::before { content: "03. "; }

.numbered-heading::before {
    color: var(--accent-color);
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 400;
    margin-right: 10px;
}

.numbered-heading::after {
    content: "";
    display: block;
    position: relative;
    top: 0;
    width: 300px;
    height: 1px;
    margin-left: 20px;
    background-color: var(--border-color);
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 3rem;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 0 10px;
    padding: 0;
    margin: 20px 0 0 0;
    overflow: hidden;
    list-style: none;
}

.skills-list li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 20px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.skills-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 1.1rem;
    line-height: 1.1;
}

.about-pic {
    position: relative;
    max-width: 300px;
}

.wrapper {
    display: block;
    position: relative;
    width: 100%;
    border-radius: 4px;
    background-color: var(--accent-color);
}

.wrapper img {
    position: relative;
    border-radius: 4px;
    mix-blend-mode: multiply;
    filter: grayscale(100%) contrast(1);
    transition: var(--transition);
    width: 100%;
    height: auto;
    z-index: 2;
}

.wrapper::before {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    transition: var(--transition);
    background-color: var(--bg-color);
    mix-blend-mode: screen;
    z-index: 3;
}

.wrapper::after {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    transition: var(--transition);
    z-index: 1;
    top: 20px;
    left: 20px;
}

.wrapper:hover img {
    filter: none;
    mix-blend-mode: normal;
}

.wrapper:hover::after {
    top: 15px;
    left: 15px;
}

.wrapper:hover::before {
    background-color: transparent;
}

/* Featured Projects (Martins Style) */
.featured-projects {
    display: flex;
    flex-direction: column;
    gap: 120px;
}

.project-card {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
    position: relative;
    border: none;
    background: transparent;
    padding: 0;
    gap: 0;
}

.project-card:hover {
    transform: none;
    background: transparent;
}

.project-image-container {
    grid-column: 1 / 8;
    grid-row: 1 / -1;
    height: 450px;
    position: relative;
    z-index: 1;
    perspective: 1000px;
}

.project-card:nth-child(even) .project-image-container {
    grid-column: 6 / -1;
}

/* Featured project stacked phone images */
.feat-stack {
    position: absolute;
    border-radius: 16px;
    height: 100%;
    width: auto;
    object-fit: contain;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.8);
    transition: var(--transition);
}

/* Odd items (Images on Left, Text on Right) - Fan left to right */
.project-card:nth-child(odd) .feat-stack.fs5 {
    height: 55%;
    width: auto;
    top: 0%;
    left: 0%;
    z-index: 1;
    opacity: 0.4;
    filter: brightness(0.5);
}

.project-card:nth-child(odd) .feat-stack.fs4 {
    height: 65%;
    width: auto;
    top: 5%;
    left: 10%;
    z-index: 2;
    opacity: 0.6;
    filter: brightness(0.65);
}

.project-card:nth-child(odd) .feat-stack.fs3 {
    height: 75%;
    width: auto;
    top: 10%;
    left: 20%;
    z-index: 3;
    opacity: 0.75;
    filter: brightness(0.8);
}

.project-card:nth-child(odd) .feat-stack.fs2 {
    height: 85%;
    width: auto;
    top: 15%;
    left: 30%;
    z-index: 4;
    opacity: 0.9;
    filter: brightness(0.9);
}

.project-card:nth-child(odd) .feat-stack.fs1 {
    height: 95%;
    width: auto;
    top: 20%;
    left: 40%;
    z-index: 5;
    opacity: 1;
    filter: none;
}

/* Even items (Images on Right, Text on Left) - Fan right to left */
.project-card:nth-child(even) .feat-stack.fs5 {
    height: 55%;
    width: auto;
    top: 0%;
    right: 0%;
    left: auto;
    z-index: 1;
    opacity: 0.4;
    filter: brightness(0.5);
}

.project-card:nth-child(even) .feat-stack.fs4 {
    height: 65%;
    width: auto;
    top: 5%;
    right: 10%;
    left: auto;
    z-index: 2;
    opacity: 0.6;
    filter: brightness(0.65);
}

.project-card:nth-child(even) .feat-stack.fs3 {
    height: 75%;
    width: auto;
    top: 10%;
    right: 20%;
    left: auto;
    z-index: 3;
    opacity: 0.75;
    filter: brightness(0.8);
}

.project-card:nth-child(even) .feat-stack.fs2 {
    height: 85%;
    width: auto;
    top: 15%;
    right: 30%;
    left: auto;
    z-index: 4;
    opacity: 0.9;
    filter: brightness(0.9);
}

.project-card:nth-child(even) .feat-stack.fs1 {
    height: 95%;
    width: auto;
    top: 20%;
    right: 40%;
    left: auto;
    z-index: 5;
    opacity: 1;
    filter: none;
}

/* Image Hover Expansion */
.feat-stack:hover {
    transform: scale(1.15) !important;
    z-index: 10 !important;
    opacity: 1 !important;
    filter: none !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.9);
}

.project-content {
    grid-column: 6 / -1;
    grid-row: 1 / -1;
    z-index: 2;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.project-card:nth-child(even) .project-content {
    grid-column: 1 / 8;
    text-align: left;
    align-items: flex-start;
}

.project-overline {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-family: var(--font-body);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.project-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.project-desc-box {
    background: #112240;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
}

.project-tags {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    list-style: none;
}

.project-tag {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: transparent;
    padding: 0;
    font-family: var(--font-body);
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.3);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-heading);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.project-links a i {
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.project-links a:hover {
    background: rgba(100, 255, 218, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.2);
}

.project-links a:hover i {
    color: var(--accent-color);
}

.cta-text {
    font-weight: 500;
    letter-spacing: 0.5px;
}



/* Keyframes for Flat Horizontal Cascade */
@keyframes highlight-fs5 {
    0%, 15% { transform: translate(-100%, -50%) scale(1.1); z-index: 10; opacity: 1; filter: brightness(1.1); }
    20%, 95% { transform: translate(-100%, -50%) scale(1); z-index: 1; opacity: 0.5; filter: brightness(0.6); }
    100% { transform: translate(-100%, -50%) scale(1.1); z-index: 10; opacity: 1; filter: brightness(1.1); }
}
@keyframes highlight-fs4 {
    0%, 15% { transform: translate(-50%, -50%) scale(1); z-index: 2; opacity: 0.5; filter: brightness(0.6); }
    20%, 35% { transform: translate(-50%, -50%) scale(1.1); z-index: 10; opacity: 1; filter: brightness(1.1); }
    40%, 100% { transform: translate(-50%, -50%) scale(1); z-index: 2; opacity: 0.5; filter: brightness(0.6); }
}
@keyframes highlight-fs3 {
    0%, 35% { transform: translate(0%, -50%) scale(1); z-index: 3; opacity: 0.5; filter: brightness(0.6); }
    40%, 55% { transform: translate(0%, -50%) scale(1.1); z-index: 10; opacity: 1; filter: brightness(1.1); }
    60%, 100% { transform: translate(0%, -50%) scale(1); z-index: 3; opacity: 0.5; filter: brightness(0.6); }
}
@keyframes highlight-fs2 {
    0%, 55% { transform: translate(50%, -50%) scale(1); z-index: 4; opacity: 0.5; filter: brightness(0.6); }
    60%, 75% { transform: translate(50%, -50%) scale(1.1); z-index: 10; opacity: 1; filter: brightness(1.1); }
    80%, 100% { transform: translate(50%, -50%) scale(1); z-index: 4; opacity: 0.5; filter: brightness(0.6); }
}
@keyframes highlight-fs1 {
    0%, 75% { transform: translate(100%, -50%) scale(1); z-index: 5; opacity: 0.5; filter: brightness(0.6); }
    80%, 95% { transform: translate(100%, -50%) scale(1.1); z-index: 10; opacity: 1; filter: brightness(1.1); }
    100% { transform: translate(100%, -50%) scale(1); z-index: 5; opacity: 0.5; filter: brightness(0.6); }
}



/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.contact-text {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.app-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.app-card:hover {
    border-color: rgba(0, 245, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

/* Stacked phone screenshots */
.app-screenshots {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: rgba(5, 10, 20, 0.6);
    perspective: 800px;
}

.phone-stack {
    position: absolute;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    transition: var(--transition);
}


footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Scroll Animations */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1080px) {
    .main-content {
        padding: 0 50px;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .main-content {
        padding: 0 20px;
    }
    .top-nav {
        padding: 0 1.25rem;
        height: 70px;
    }
    .nav-links-top {
        display: none;
    }
    .top-nav .resume-btn {
        display: none; /* Hidden in top nav; shown in drawer */
    }
    .hamburger {
        display: flex;
    }
    .mobile-nav-drawer {
        display: flex;
    }
    .nav-overlay {
        display: block;
    }
    .side-element {
        display: none;
    }

    /* Hero */
    .hero-section {
        padding-top: 70px; /* account for fixed nav */
    }
    .hero-title {
        font-size: clamp(2.2rem, 9vw, 3.5rem);
    }
    .hero-subtitle {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
    .hero-desc {
        font-size: 1rem;
        margin-bottom: 2.5rem;
    }
    .hero-btn {
        align-self: stretch;
        justify-content: center;
        padding: 1rem 1.5rem;
    }

    /* Content Sections */
    .content-section {
        padding: 60px 0;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .about-pic {
        margin: 0 auto;
        max-width: 220px;
        /* Clip the offset border so it doesn't overflow */
        padding-right: 20px;
        padding-bottom: 20px;
    }
    .about-text p {
        font-size: 1rem;
    }
    .skills-list {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }

    /* Experience */
    .experience-list .exp-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    /* Projects */
    .featured-projects {
        gap: 60px;
    }
    .project-card {
        display: block !important;
        width: 100% !important;
        margin-bottom: 4rem;
    }
    
    .project-content,
    .project-card:nth-child(even) .project-content {
        display: block !important;
        width: 100% !important;
        padding: 0 0 1.5rem 0 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        text-align: left !important;
    }
    
    .project-desc-box {
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        margin-bottom: 1.25rem;
        text-align: left !important;
    }
    
    .project-tags { justify-content: flex-start !important; }
    .project-links { justify-content: flex-start !important; }

    /* Horizontal Scrolling Image Container */
    .project-image-container,
    .project-card:nth-child(even) .project-image-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        width: calc(100% + 40px) !important; /* Break out of 20px container padding */
        margin-left: -20px !important;
        padding: 0 20px 20px 20px !important;
        height: 480px !important;
        gap: 1rem !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        touch-action: pan-x pan-y !important;
        pointer-events: auto !important;
        perspective: none !important; /* Fixes iOS Safari scroll bug */
        transform-style: flat !important;
    }
    
    .project-image-container::-webkit-scrollbar {
        display: none; /* Hide scrollbars per user request */
    }
    .project-name {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    .project-tags {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .project-links { justify-content: center; }    
    
    /* Flat Screenshots in the horizontal container */
    .project-card .feat-stack,
    .project-card:nth-child(even) .feat-stack {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        height: 100% !important;
        width: auto !important;
        max-width: none !important;
        min-width: unset !important;
        object-fit: contain !important;
        flex: 0 0 auto !important;
        scroll-snap-align: center;
        transform: scale(0.92) !important;
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s ease !important;
        animation: none !important;
        opacity: 0.5 !important;
        filter: none !important;
        z-index: 1 !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.4) !important;
        border-radius: 16px !important;
    }
    
    .project-card .feat-stack.active {
        transform: scale(1) !important;
        opacity: 1 !important;
        z-index: 10 !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.7) !important;
    }
    
    /* Correct horizontal ordering on mobile */
    .project-card .feat-stack.fs1 { order: 1 !important; }
    .project-card .feat-stack.fs2 { order: 2 !important; }
    .project-card .feat-stack.fs3 { order: 3 !important; }
    .project-card .feat-stack.fs4 { order: 4 !important; }
    .project-card .feat-stack.fs5 { order: 5 !important; }

    /* Contact */
    #contact {
        margin-bottom: 60px !important;
    }
    #contact h2 {
        font-size: 2rem !important;
    }
    #contact p {
        font-size: 0.95rem;
    }
    #contact .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.35rem;
    }
    .project-image-container,
    .project-card:nth-child(even) .project-image-container {
        height: 300px;
    }
    .project-links a {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
    }
}
