:root {
    --sky-top: #4f7dc0;
    --sky-mid: #6b95d1;
    --sky-low: #9dbbe6;
    --cream: #fbf5e6;
    --ink-soft: rgba(255, 255, 255, 0.82);
    --panel: rgba(12, 28, 68, 0.72);
    --panel-2: rgba(12, 28, 68, 0.84);
    --panel-3: rgba(255, 255, 255, 0.24);
    --band: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(48, 84, 150, 0.34);
    --nav-bg-scrolled: rgba(42, 74, 138, 0.52);
    --nav-solid: #3a68b0;
    --serif: 'Fraunces', Georgia, serif;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--nav-solid);
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    text-shadow: 0 1px 14px rgba(24, 52, 110, 0.28);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: var(--nav-bg-scrolled);
}

.nav-brand h3 {
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 1.35rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #fff;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #fff;
}

.nav-link:hover::after {
    width: 100%;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 74px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.hero-text h2 {
    font-size: 1.5rem;
    color: var(--ink-soft);
    margin-bottom: 1rem;
    font-weight: 400;
}

.hero-text p {
    color: var(--ink-soft);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-button {
    background: var(--panel-2);
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--panel-3);
    transform: translateY(-2px);
}

.hero-text {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 1s ease-out 0.5s forwards;
}

.hero-image {
    display: flex;
    justify-content: center;
    min-width: 350px;
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 1s ease-out 0.8s forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.profile-img {
    width: 350px;
    height: 350px;
    background: var(--panel);
    border-radius: 20px;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    cursor: pointer;
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    transition: all 0.3s ease;
}

.profile-img:hover {
    background: #fff;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.profile-img.clicked {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5), 0 0 60px rgba(255, 255, 255, 0.3);
}

.profile-img.clicked img {
    transform: scale(1.1);
}

.star {
    position: absolute;
    color: #ffe27a;
    font-size: 20px;
    text-shadow: 0 0 10px #ffd34d, 0 0 20px #ffd34d, 0 0 30px #ffd34d;
    animation: orbit 5s linear infinite;
    transform-origin: 50% 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-img:hover .star {
    opacity: 1;
}

.star1 { top: 50%; left: 50%; --radius: 170px; transform: translate(-50%, -50%) translate(170px, 0); animation-delay: 0s; }
.star2 { top: 50%; left: 50%; --radius: 180px; transform: translate(-50%, -50%) translate(180px, 0); animation-delay: 0.83s; }
.star3 { top: 50%; left: 50%; --radius: 175px; transform: translate(-50%, -50%) translate(175px, 0); animation-delay: 1.67s; }
.star4 { top: 50%; left: 50%; --radius: 165px; transform: translate(-50%, -50%) translate(165px, 0); animation-delay: 2.5s; }
.star5 { top: 50%; left: 50%; --radius: 185px; transform: translate(-50%, -50%) translate(185px, 0); animation-delay: 3.33s; }
.star6 { top: 50%; left: 50%; --radius: 175px; transform: translate(-50%, -50%) translate(175px, 0); animation-delay: 4.17s; }

@keyframes orbit {
    0% { transform: translate(-50%, -50%) translate(var(--radius, 175px), 0); }
    25% { transform: translate(-50%, -50%) translate(0, var(--radius, 175px)); }
    50% { transform: translate(-50%, -50%) translate(calc(var(--radius, 175px) * -1), 0); }
    75% { transform: translate(-50%, -50%) translate(0, calc(var(--radius, 175px) * -1)); }
    100% { transform: translate(-50%, -50%) translate(var(--radius, 175px), 0); }
}

/* Statistics */
.stats {
    padding: 4rem 0;
    background: var(--band);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--ink-soft);
    font-size: 1.1rem;
}

/* Skills */
.skills {
    padding: 3rem 0;
}

.section-title {
    text-align: left;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #fff;
}

/* Filter Buttons */
.skill-filters, .contact-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--panel);
    color: var(--ink-soft);
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.filter-btn:hover {
    background: var(--panel-2);
    color: #fff;
}

.filter-btn.active {
    background: var(--panel-3);
    color: #fff;
}

.skills-container, .contact-container {
    min-height: 200px;
}

.skills-grid, .contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    transition: all 0.3s ease;
}

.skill-card, .contact-card {
    background: var(--panel);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 160px;
    opacity: 0;
    transform: translateX(50px);
}

.skill-card.animate, .contact-card.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Skill Colors - Apply to text and icons */
.skill-card[data-skill="html5"] i { color: #e34f26; }
.skill-card[data-skill="html5"] span { color: #e34f26; }
.skill-card[data-skill="css3"] i { color: #1572b6; }
.skill-card[data-skill="css3"] span { color: #1572b6; }
.skill-card[data-skill="javascript"] i { color: #f7df1e; }
.skill-card[data-skill="javascript"] span { color: #f7df1e; }
.skill-card[data-skill="react"] i { color: #61dafb; }
.skill-card[data-skill="react"] span { color: #61dafb; }
.skill-card[data-skill="vue"] i { color: #4fc08d; }
.skill-card[data-skill="vue"] span { color: #4fc08d; }
.skill-card[data-skill="bootstrap"] i { color: #7952b3; }
.skill-card[data-skill="bootstrap"] span { color: #7952b3; }
.skill-card[data-skill="sass"] i { color: #cc6699; }
.skill-card[data-skill="sass"] span { color: #cc6699; }
.skill-card[data-skill="tailwind"] i { color: #06b6d4; }
.skill-card[data-skill="tailwind"] span { color: #06b6d4; }
.skill-card[data-skill="nodejs"] i { color: #339933; }
.skill-card[data-skill="nodejs"] span { color: #339933; }
.skill-card[data-skill="php"] i { color: #777bb4; }
.skill-card[data-skill="php"] span { color: #777bb4; }
.skill-card[data-skill="laravel"] i { color: #ff2d20; }
.skill-card[data-skill="laravel"] span { color: #ff2d20; }
.skill-card[data-skill="mysql"] i { color: #4479a1; }
.skill-card[data-skill="mysql"] span { color: #4479a1; }
.skill-card[data-skill="mongodb"] i { color: #47a248; }
.skill-card[data-skill="mongodb"] span { color: #47a248; }
.skill-card[data-skill="firebase"] i { color: #ffca28; }
.skill-card[data-skill="firebase"] span { color: #ffca28; }
.skill-card[data-skill="express"] i { color: #fff; }
.skill-card[data-skill="express"] span { color: #fff; }
.skill-card[data-skill="python"] i { color: #3776ab; }
.skill-card[data-skill="python"] span { color: #3776ab; }
.skill-card[data-skill="git"] i { color: #f05032; }
.skill-card[data-skill="git"] span { color: #f05032; }
.skill-card[data-skill="github"] i { color: #fff; }
.skill-card[data-skill="github"] span { color: #fff; }
.skill-card[data-skill="figma"] i { color: #f24e1e; }
.skill-card[data-skill="figma"] span { color: #f24e1e; }
.skill-card[data-skill="vscode"] i { color: #007acc; }
.skill-card[data-skill="vscode"] span { color: #007acc; }
.skill-card[data-skill="npm"] i { color: #cb3837; }
.skill-card[data-skill="npm"] span { color: #cb3837; }
.skill-card[data-skill="docker"] i { color: #2496ed; }
.skill-card[data-skill="docker"] span { color: #2496ed; }
.skill-card[data-skill="terminal"] i { color: #4d4d4d; }
.skill-card[data-skill="terminal"] span { color: #4d4d4d; }
.skill-card[data-skill="adobe"] i { color: #ff0000; }
.skill-card[data-skill="adobe"] span { color: #ff0000; }

.skill-card.hidden, .contact-card.hidden {
    display: none;
}

.skill-card:hover, .contact-card:hover {
    transform: translateY(-2px);
    background: var(--panel-2);
}

.skill-card i, .contact-card i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.skill-card span, .contact-card span {
    font-weight: 400;
    white-space: nowrap;
}

/* Brands */
.brands {
    padding: 3rem 0;
    background: var(--band);
    overflow: hidden;
}

.brands .section-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.brands p {
    color: var(--ink-soft);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.brand-slider {
    margin-top: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.brand-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, and Opera */
}

.brand-track {
    display: flex;
    animation: scroll 20s linear infinite;
    width: calc(120px * 16);
    animation-play-state: running;
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}

.brand-track:hover {
    animation-play-state: running;
}

.brand-track:active {
    cursor: grabbing;
}

.brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 0.8rem;
    transition: all 0.3s ease;
}

.brand-item i {
    font-size: 2.5rem;
    color: var(--ink-soft);
    transition: color 0.3s ease;
}

.brand-item:hover i {
    color: inherit;
}

/* Brand Colors on Hover */
.brand-item[data-brand="google"]:hover i { color: #4285f4; }
.brand-item[data-brand="facebook"]:hover i { color: #1877f2; }
.brand-item[data-brand="youtube"]:hover i { color: #ff0000; }
.brand-item[data-brand="github"]:hover i { color: #fff; }
.brand-item[data-brand="microsoft"]:hover i { color: #00a1f1; }
.brand-item[data-brand="apple"]:hover i { color: #fff; }
.brand-item[data-brand="dribbble"]:hover i { color: #ea4c89; }
.brand-item[data-brand="spotify"]:hover i { color: #1db954; }

.brand-item span {
    display: none;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Projects */
.projects {
    padding: 4rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--panel);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
}

.project-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.project-card:nth-child(odd).animate {
    animation: slideInLeft 0.8s ease-out forwards;
}

.project-card:nth-child(even).animate {
    animation: slideInRight 0.8s ease-out forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px) translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px) translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: var(--panel-2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.project-placeholder.clicked {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.project-placeholder.clicked img {
    transform: scale(1.1);
}

.project-card:hover .project-placeholder {
    transform: scale(1.1);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: var(--panel-2);
    color: var(--ink-soft);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.project-info p {
    color: var(--ink-soft);
    line-height: 1.6;
}

/* Contact */
.contact {
    padding: 3rem 0;
    background: var(--band);
}

.contact .section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

/* Message Section */
.message {
    padding: 4rem 0;
    background: transparent;
}

.contact-form-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-form-section .section-title {
    color: #fff;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    text-align: center;
}

.contact-form {
    max-width: 600px;
    width: 100%;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.contact-form.animate {
    opacity: 1;
    transform: translateY(0);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--panel);
    border: 1px solid var(--panel-2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--panel-3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.submit-btn {
    background: var(--panel-2);
    color: #fff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.submit-btn:hover {
    background: var(--panel-3);
    transform: translateY(-2px);
}

/* Navigation scroll offset */
section {
    scroll-margin-top: 100px;
}

.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--panel-2);
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 900px) {
    .navbar { padding: 0 1rem; }
    .nav-menu { gap: 1.1rem; }
    .nav-brand h3 { font-size: 1.2rem; }
    .navbar { font-size: 0.92rem; }
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-image {
        min-width: auto;
        order: -1;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-img {
        width: 250px;
        height: 250px;
        font-size: 4rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* ===== Sky theme ===== */
.sky {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-low) 100%);
}

.sun {
    position: absolute;
    top: 15vh;
    right: 5vw;
    width: clamp(56px, 7vw, 96px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: repeating-linear-gradient(135deg, rgba(255, 226, 122, 0.95) 0 3px, rgba(255, 226, 122, 0) 3px 8px);
    filter: blur(0.4px);
    opacity: 0.85;
}

.cloud {
    position: absolute;
    left: 0;
    top: var(--y);
    width: var(--w);
    height: auto;
    opacity: var(--o, 0.85);
    filter: blur(var(--b, 0px));
    transform: translate3d(var(--x, 10vw), 0, 0);
    animation: cloudDrift var(--d) linear var(--delay, 0s) infinite;
    will-change: transform;
}

.cloud.c1 { --y: 6%;  --w: clamp(320px, 44vw, 720px); --d: 120s; --delay: -35s;  --o: 0.92; --x: 8vw; }
.cloud.c2 { --y: 20%; --w: clamp(240px, 28vw, 480px); --d: 80s;  --delay: -60s;  --o: 0.8;  --x: 62vw; }
.cloud.c3 { --y: 44%; --w: clamp(300px, 38vw, 640px); --d: 150s; --delay: -110s; --o: 0.88; --x: 30vw; }
.cloud.c4 { --y: 60%; --w: clamp(220px, 26vw, 420px); --d: 95s;  --delay: -20s;  --o: 0.72; --x: 70vw; }
.cloud.c5 { --y: 76%; --w: clamp(300px, 40vw, 680px); --d: 130s; --delay: -90s;  --o: 0.78; --x: 12vw; }
.cloud.c6 { --y: 33%; --w: clamp(200px, 22vw, 360px); --d: 70s;  --delay: -45s;  --o: 0.6;  --x: 85vw; --b: 1.2px; }

@keyframes cloudDrift {
    from { transform: translate3d(-100%, 0, 0); }
    to   { transform: translate3d(100vw, 0, 0); }
}

/* Serif display type, same family as the reference headline */
.hero-text h1,
.section-title,
.stat-item h3,
.nav-brand h3 {
    font-family: var(--serif);
    letter-spacing: -0.01em;
}

.hero-text h1,
.section-title,
.stat-item h3 {
    color: var(--cream);
}

.hero-text h1 { font-weight: 600; min-height: 1.6em; }
.hero-text h2 { color: #fff; min-height: 1.6em; }
.hero-text p,
.stat-item p,
.project-info p { color: rgba(255, 255, 255, 0.9); }

.nav-brand h3,
.nav-link { color: rgba(255, 255, 255, 0.88); }

.navbar {
    border-radius: 0 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

/* Frosted panels on the sky */
.skill-card, .contact-card, .project-card, .filter-btn, .tech-tag,
.form-group input, .form-group textarea {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.project-card,
.skill-card, .contact-card {
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.cta-button, .submit-btn {
    background: var(--cream);
    color: #1c3566;
    font-weight: 600;
    text-shadow: none;
}

.cta-button:hover, .submit-btn:hover {
    background: #fff;
    color: #1c3566;
}

.filter-btn { color: #fff; background: var(--panel); }
.filter-btn:hover { background: var(--panel-2); }
.filter-btn.active { background: var(--cream); color: #1c3566; text-shadow: none; }

.skill-card[data-skill="terminal"] i,
.skill-card[data-skill="terminal"] span { color: #cfe0ff; }
.skill-card[data-skill="css3"] i,
.skill-card[data-skill="css3"] span { color: #4aa3ff; }

.stats, .brands, .contact {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.brand-item i { color: rgba(255, 255, 255, 0.8); }

.profile-img {
    background: rgba(16, 36, 82, 0.4);
    box-shadow: 0 20px 40px -12px rgba(20, 44, 100, 0.55);
}

.profile-img:hover { background: var(--cream); }

.form-group input,
.form-group textarea {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(16, 36, 82, 0.4);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255, 255, 255, 0.65); }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--cream); }

.footer {
    border-top-color: rgba(255, 255, 255, 0.2);
    padding-bottom: 2rem;
}

/* ===== Music player: slim pill with two records (inline in hero, not fixed) ===== */
.player {
    position: relative;
    width: min(300px, 100%);
    height: 84px;
    margin: 0.4rem 0 0.9rem;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    color: #262626;
    border-radius: 999px;
    background: linear-gradient(180deg, #f8f4eb 0%, #e9e4d8 100%);
    box-shadow:
        0 12px 22px -10px rgba(18, 40, 96, 0.5),
        0 2px 4px rgba(18, 40, 96, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.95),
        inset 0 -5px 8px rgba(0, 0, 0, 0.08);
    text-shadow: none;
}

.vinyl {
    flex: none;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        conic-gradient(from 20deg, rgba(255, 255, 255, 0) 0 18%, rgba(255, 255, 255, 0.16) 25%, rgba(255, 255, 255, 0) 32% 68%, rgba(255, 255, 255, 0.16) 75%, rgba(255, 255, 255, 0) 82%),
        repeating-radial-gradient(circle at center, #101010 0 2px, #232323 3px 4px);
    box-shadow:
        0 0 0 2px #d8d3c7,
        0 3px 6px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    animation: vinylSpin 2.4s linear infinite paused;
}

.vinyl-label {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at center, #151515 0 2px, #d1cb72 3px 100%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}

.vinyl-right { animation-direction: reverse; }
.player.is-playing .vinyl { animation-play-state: running; }

@keyframes vinylSpin { to { transform: rotate(360deg); } }

.player-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 6px;
}

.track-title,
.track-artist {
    max-width: 100%;
    margin: 0;
    font-family: 'DM Mono', ui-monospace, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.track-title { font-size: 11px; font-weight: 500; line-height: 1.3; color: #1f1f1f; }
.track-artist { font-size: 9px; line-height: 1.2; color: #6f6b61; }

.seek {
    --p: 0%;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 14px;
    margin: 3px 0 0;
    background: transparent;
    cursor: pointer;
}

.seek::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 6px;
    background: linear-gradient(to right, #8c887d var(--p), #2a2a2a var(--p));
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}

.seek::-moz-range-track {
    height: 6px;
    border-radius: 6px;
    background: #2a2a2a;
}

.seek::-moz-range-progress {
    height: 6px;
    border-radius: 6px;
    background: #8c887d;
}

.seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    margin-top: -3px;
    border-radius: 50%;
    border: 1px solid #a49f92;
    background: radial-gradient(circle at 35% 30%, #fff, #ddd8cb);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.seek::-moz-range-thumb {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid #a49f92;
    background: radial-gradient(circle at 35% 30%, #fff, #ddd8cb);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.seek:focus-visible,
.play-btn:focus-visible {
    outline: 2px solid #3a68b0;
    outline-offset: 2px;
    border-radius: 8px;
}

/* the player now lives inside .hero-text, so beat its generic `.hero-text p` rule */
.hero-text .player .track-title,
.hero-text .player .track-artist {
    margin: 0;
    max-width: 100%;
    text-align: center;
}
.hero-text .player .track-title { font-size: 11px; color: #1f1f1f; }
.hero-text .player .track-artist { font-size: 9px; color: #6f6b61; }

.times {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: -1px;
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 8px;
    color: #7a766c;
}

.play-btn {
    width: 36px;
    height: 22px;
    margin-top: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #1d1d1d;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.play-btn:hover { background: rgba(0, 0, 0, 0.07); }
.play-btn:active { transform: scale(0.94); }

.play-btn .icon-pause { display: none; }
.player.is-playing .play-btn .icon-play { display: none; }
.player.is-playing .play-btn .icon-pause { display: block; }

@media (max-width: 768px) {
    .player { margin: 0.4rem auto 0.9rem; }
}

@media (max-width: 420px) {
    .player { height: 78px; padding: 0 8px; }
    .vinyl { width: 48px; height: 48px; }
    .vinyl-label { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .cloud { animation: none; }
    .vinyl { animation: none; }
}

/* Brand colors, lightened so they stay readable on the dark-blue panels */
.skill-card, .contact-card, .project-card, .filter-btn, .tech-tag,
.form-group input, .form-group textarea { text-shadow: none; }

.skill-card[data-skill="html5"] i, .skill-card[data-skill="html5"] span { color: #ff7a4d; }
.skill-card[data-skill="bootstrap"] i, .skill-card[data-skill="bootstrap"] span { color: #b99cf0; }
.skill-card[data-skill="sass"] i, .skill-card[data-skill="sass"] span { color: #ef8fc0; }
.skill-card[data-skill="nodejs"] i, .skill-card[data-skill="nodejs"] span { color: #7fdc7f; }
.skill-card[data-skill="php"] i, .skill-card[data-skill="php"] span { color: #a9aef0; }
.skill-card[data-skill="laravel"] i, .skill-card[data-skill="laravel"] span { color: #ff7a6e; }
.skill-card[data-skill="mysql"] i, .skill-card[data-skill="mysql"] span { color: #78bff0; }
.skill-card[data-skill="mongodb"] i, .skill-card[data-skill="mongodb"] span { color: #6fdc7a; }
.skill-card[data-skill="python"] i, .skill-card[data-skill="python"] span { color: #6fb0f5; }
.skill-card[data-skill="git"] i, .skill-card[data-skill="git"] span { color: #ff8566; }
.skill-card[data-skill="figma"] i, .skill-card[data-skill="figma"] span { color: #ff8566; }
.skill-card[data-skill="vscode"] i, .skill-card[data-skill="vscode"] span { color: #5cbcff; }
.skill-card[data-skill="npm"] i, .skill-card[data-skill="npm"] span { color: #ff7878; }
.skill-card[data-skill="docker"] i, .skill-card[data-skill="docker"] span { color: #5cbcff; }
.skill-card[data-skill="adobe"] i, .skill-card[data-skill="adobe"] span { color: #ff7a7a; }

/* Headings stay legible when a cloud drifts behind them */
.hero-text h1,
.section-title,
.stat-item h3 {
    text-shadow: 0 2px 4px rgba(24, 52, 110, 0.45), 0 4px 22px rgba(24, 52, 110, 0.55);
}

/* ===== Navbar on phones: links shown directly (no hamburger) ===== */
@media (max-width: 640px) {
    .navbar {
        height: 54px;
        padding: 0 0.6rem;
        justify-content: center;
        font-size: 0.8rem;
        border-radius: 0 0 16px 16px;
    }

    .nav-brand { display: none; }

    .nav-menu {
        width: 100%;
        justify-content: space-between;
        gap: 0.4rem;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .nav-menu::-webkit-scrollbar { display: none; }
    .nav-menu li { flex: none; }
    .nav-link::after { bottom: -3px; }
    .hero { padding-top: 64px; }
    section { scroll-margin-top: 70px; }
}
