/* ===== CSS Variables ===== */
:root {
    --bg-primary: #262624;
    --bg-secondary: #1a1a18;
    --text-primary: #ffffff;
    --text-secondary: #e5e5e5;
    --text-muted: #a0a0a0;
    --gold: #f4c430;
    --blue: #4a9eff;
    
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

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

/* ===== Navigation ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    backdrop-filter: blur(10px);
    background: rgba(38, 38, 36, 0.8);
    border-bottom: 1px solid rgba(244, 196, 48, 0.1);
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-logo:hover {
    transform: scale(1.1) rotate(-5deg);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--gold);
}

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

.nav-link.active {
    color: var(--gold);
}

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

/* ===== Hero Section ===== */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

#hero #aurora-background {
    opacity: 0.3;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 4rem;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(
        110deg,
        var(--text-primary) 0%,
        var(--gold) 35%,
        rgba(255, 255, 255, 0.9) 50%,
        var(--gold) 65%,
        var(--text-primary) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out, heroShimmer 8s ease-in-out infinite;
}

@keyframes heroShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: 0% 0;
    }
}

.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.highlight-gold {
    color: var(--gold);
    font-weight: 600;
}

.highlight-blue {
    color: var(--blue);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 2rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn-primary {
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--gold);
    border: 2px solid var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 4px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gold);
    transition: left 0.4s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: var(--bg-primary);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    left: 0;
}

.hero-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
}

.social-link:hover {
    color: var(--blue);
    transform: translateY(-3px);
}

/* Floating Shapes */
.hero-visual {
    position: relative;
    height: 400px;
}

.floating-shape {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: var(--gold);
    top: 0;
    right: 100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: var(--blue);
    top: 150px;
    right: 50px;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: var(--gold);
    top: 80px;
    right: 280px;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    animation: fadeIn 1s ease-out 1s both;
}

.scroll-arrow {
    width: 20px;
    height: 30px;
    border: 2px solid var(--gold);
    border-radius: 20px;
    position: relative;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: var(--gold);
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(12px);
        opacity: 0;
    }
}

/* ===== Section Titles ===== */
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 4rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--blue) 100%);
}

/* ===== About Section ===== */
#about {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-intro {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--gold);
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateX(10px);
    box-shadow: -8px 8px 0 var(--gold);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Experience Section ===== */
#experience {
    padding: 6rem 0;
}

.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: -.05rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--blue) 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateX(-30px);
    transition: var(--transition-smooth);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    position: absolute;
    left: -3.5rem;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border: 4px solid var(--bg-primary);
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.5);
    box-shadow: 0 0 20px var(--gold);
}

.timeline-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(244, 196, 48, 0.1);
    transition: var(--transition-smooth);
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--gold);
}

/* Company Logo Styling */
.company-logo {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
    background: var(--bg-primary);
    margin-top: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover .company-logo {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(244, 196, 48, 0.3), 0 0 30px rgba(244, 196, 48, 0.15);
}

/* Timeline text content wrapper - takes remaining space */
.timeline-text-content {
    flex: 1;
    min-width: 0;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.timeline-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    position: relative;
    display: inline-block;
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-header h3 {
    background: linear-gradient(
        120deg,
        var(--gold) 40%,
        rgba(255, 255, 255, 0.95) 50%,
        var(--gold) 60%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 2.5s linear infinite;
}

.timeline-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.timeline-org {
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-org {
    background: linear-gradient(
        120deg,
        var(--blue) 40%,
        rgba(255, 255, 255, 0.95) 50%,
        var(--blue) 60%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 2.5s linear infinite;
}

.timeline-details {
    list-style: none;
    margin-top: 1rem;
}

.timeline-details li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.timeline-details li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: bold;
}

/* ===== Expandable Details (Experience & Projects) ===== */
.expand-toggle {
    width: 100%;
    margin-top: 0;
    padding: 0;
    border: none;
    border-top: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    opacity: 0;
    max-height: 0;
    pointer-events: none;
}

.expand-toggle-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
}

.timeline-content:hover .expand-toggle,
.project-card:hover .expand-toggle {
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    border-top-color: rgba(244, 196, 48, 0.15);
    opacity: 1;
    max-height: 40px;
    pointer-events: auto;
}

.timeline-content:hover .expand-toggle,
.project-card:hover .expand-toggle {
    color: var(--gold);
}

/* Hide the hint row completely while expanded so details replace it */
.timeline-content .expand-toggle[aria-expanded="true"],
.project-card .expand-toggle[aria-expanded="true"] {
    margin-top: 0;
    padding-top: 0;
    border-top-color: transparent;
    opacity: 0;
    max-height: 0;
    pointer-events: none;
}

.expandable-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top: 1px solid transparent;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.4s ease, padding-top 0.4s ease, padding-bottom 0.4s ease, border-top-color 0.4s ease;
}

.expandable-details.open {
    opacity: 1;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    padding-bottom: 1rem;
    border-top-color: rgba(244, 196, 48, 0.15);
}

.details-heading {
    font-family: var(--font-display);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.details-section {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.details-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.details-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.15rem 0.65rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(74, 158, 255, 0.5);
    background: rgba(74, 158, 255, 0.06);
    color: var(--blue);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease-out;
    position: relative;
    overflow: visible;
    isolation: isolate;
}

/* Add a second pseudo-element for the shimmer effect */
.details-link:not(.clicked) {
    box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.3);
}

/* Arrow icon - thick and stubby style matching konami code */
.details-link::after {
    content: '';
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-left: 0.35rem;
    margin-bottom: 0.1rem;
    /* Create thick stubby arrow using borders */
    border-top: 2.5px solid var(--blue);
    border-right: 2.5px solid var(--blue);
    transform: rotate(45deg);
    transition: var(--transition-smooth);
}

/* Diagonal glint animation for unclicked links */
.details-link:not(.clicked) {
    position: relative;
    overflow: hidden;
}

.details-link:not(.clicked)::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    /* Create diagonal gradient glint - very gentle and subtle */
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 40%,
        rgba(74, 158, 255, 0.08) 44%,
        rgba(74, 158, 255, 0.2) 48%,
        rgba(74, 158, 255, 0.4) 50%,
        rgba(74, 158, 255, 0.2) 52%,
        rgba(74, 158, 255, 0.08) 56%,
        transparent 60%,
        transparent 100%
    );
    z-index: 1;
    opacity: 0.5;
    pointer-events: none;
    /* Animate the glint traveling diagonally across the button - slower and gentler */
    animation: diagonalGlint 3s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Diagonal glint animation - continuously moves from top-left to bottom-right */
@keyframes diagonalGlint {
    0% {
        transform: translateX(-50%) translateY(-50%);
    }
    100% {
        transform: translateX(50%) translateY(50%);
    }
}

/* Remove shimmer when clicked */
.details-link.clicked::before {
    display: none;
}

.details-link:hover {
    background: var(--blue);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.details-link:hover::after {
    border-color: var(--bg-primary);
}

.details-link.clicked:hover::after {
    border-color: var(--bg-primary);
}

/* ===== Projects Section ===== */
#projects {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    gap: 3rem;
}

.project-card {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: 12px;
    border: 2px solid transparent;
    position: relative;
    transition: var(--transition-smooth);
    opacity: 0;
    transform: translateY(30px);
}

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

.project-card:nth-child(1) {
    transform: rotate(-1deg);
}

.project-card:nth-child(2) {
    transform: rotate(1deg);
    margin-left: 2rem;
}

.project-card:nth-child(3) {
    transform: rotate(-0.5deg);
}

.project-card:nth-child(4) {
    transform: rotate(1deg);
    margin-left: 2rem;
}

.project-card.visible:nth-child(1),
.project-card.visible:nth-child(2),
.project-card.visible:nth-child(3),
.project-card.visible:nth-child(4) {
    transform: rotate(0);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--gold);
    box-shadow: 0 20px 60px rgba(244, 196, 48, 0.2);
}

.project-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    color: rgba(244, 196, 48, 0.1);
    position: absolute;
    top: 1rem;
    right: 2rem;
    line-height: 1;
}

.project-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    transition: var(--transition-smooth);
}

.project-card:hover .project-title {
    background: linear-gradient(
        120deg,
        var(--gold) 40%,
        rgba(255, 255, 255, 0.95) 50%,
        var(--gold) 60%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 2.5s linear infinite;
}

.project-subtitle {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: rgba(244, 196, 48, 0.6);
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    padding: 0.5rem 1rem;
    background: rgba(74, 158, 255, 0.1);
    color: var(--blue);
    border: 1px solid var(--blue);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.tag:hover {
    background: var(--blue);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* ===== Skills Section ===== */
#skills {
    padding: 6rem 0;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.skill-category {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.skill-category.visible {
    opacity: 1;
    transform: translateY(0);
}

.category-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--blue);
}

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

.skill-tag {
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid rgba(244, 196, 48, 0.2);
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    cursor: default;
}

.skill-tag:hover {
    background: rgba(244, 196, 48, 0.1);
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-3px) rotate(2deg);
}

/* ===== Contact Section ===== */
#contact {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-intro {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: nowrap;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent wrapping when piano button is revealed */
.contact-links.piano-revealed {
    flex-wrap: nowrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    border: 2px solid var(--gold);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1), width 0.5s ease, height 0.5s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    white-space: nowrap;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: -1;
}

.contact-btn:hover {
    color: var(--bg-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(244, 196, 48, 0.3);
}

.contact-btn:hover::before {
    width: 300px;
    height: 300px;
}

.contact-btn svg {
    transition: var(--transition-smooth);
}

.contact-btn:hover svg {
    transform: rotate(15deg);
}

.contact-btn:hover svg.piano-icon {
    transform: rotate(15deg);
}

/* Piano button hidden by default */
.piano-btn {
    max-width: 0;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    border-left-width: 0;
    border-right-width: 0;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Piano button content (icon and text) hidden by default */
.piano-btn svg,
.piano-btn span {
    opacity: 0;
    transition: opacity 0.4s ease-in-out 0.4s, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Piano button visible state */
.piano-btn.visible {
    max-width: 300px;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    margin-left: 0;
    margin-right: 0;
    border-left-width: 2px;
    border-right-width: 2px;
}

/* Piano button content visible state */
.piano-btn.visible svg,
.piano-btn.visible span {
    opacity: 1;
    transition: opacity 0.4s ease-in-out, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Contact links animation when piano is revealed */
.contact-links.shifting {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    flex-wrap: nowrap;
}

/* Secret Piano Button Animation - Complete Redo */
.secret-btn {
    /* Start completely hidden */
    display: none;
    position: relative;
    /* Match the styling of other buttons */
    background: var(--bg-primary);
    border-radius: 8px;
    /* Important: no border initially, we'll paint it in */
    border: 2px solid transparent !important;
    /* Ensure it doesn't wrap */
    flex-shrink: 0;
}

/* When revealing, show the button */
.secret-btn.revealing {
    display: flex;
    visibility: visible;
    opacity: 1;
}

/* Hidden state for content */
.secret-btn-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    white-space: nowrap;
}

/* Border lines that will paint in */
.secret-btn::before,
.secret-btn::after {
    content: '';
    position: absolute;
    background: var(--gold);
    z-index: 10;
}

/* Top border (paints left to right) */
.secret-btn::before {
    top: -2px;
    left: -2px;
    width: 0;
    height: 2px;
}

/* Left border (paints top to bottom) */
.secret-btn::after {
    top: -2px;
    left: -2px;
    width: 2px;
    height: 0;
}

/* Right and bottom borders using additional elements */
.secret-btn .border-right {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 2px;
    height: 0;
    background: var(--gold);
    z-index: 10;
}

.secret-btn .border-bottom {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 0;
    height: 2px;
    background: var(--gold);
    z-index: 10;
}

/* Match the hover animation from other buttons - ensure it works after reveal */
.secret-btn.revealed:hover {
    color: var(--bg-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(244, 196, 48, 0.3);
    border-color: var(--gold) !important;
}

/* Hover background effect - use ::before for the circular background */
.secret-btn.revealed:hover::before {
    width: 300px;
    height: 300px;
}

/* Icon rotation on hover */
.secret-btn.revealed:hover svg {
    transform: rotate(180deg) rotate(15deg);
    transition: var(--transition-smooth);
}

/* Ensure content is on top */
.secret-btn .secret-btn-content {
    position: relative;
    z-index: 1;
}

/* Step 2: Paint top border (left to right) */
.secret-btn.revealing::before {
    animation: paintTopBorder 0.4s ease-out 0.8s forwards;
}

/* Step 2: Paint left border (top to bottom) - starts with top */
.secret-btn.revealing::after {
    animation: paintLeftBorder 0.4s ease-out 1.0s forwards;
}

/* Step 2: Paint right border (top to bottom) */
.secret-btn.revealing .border-right {
    animation: paintRightBorder 0.4s ease-out 1.2s forwards;
}

/* Step 2: Paint bottom border (right to left) */
.secret-btn.revealing .border-bottom {
    animation: paintBottomBorder 0.4s ease-out 1.4s forwards;
}

/* Step 3: Fade in content */
.secret-btn.revealing .secret-btn-content {
    animation: contentFadeIn 0.6s ease-out 1.8s forwards;
}

/* After animation completes, show actual border and reset pseudo-elements for hover */
.secret-btn.revealed {
    border: 2px solid var(--gold) !important;
}

/* Hide animated border elements after reveal */
.secret-btn.revealed::before,
.secret-btn.revealed::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    transition: width 0.5s ease, height 0.5s ease;
}

.secret-btn.revealed .border-right,
.secret-btn.revealed .border-bottom {
    display: none;
}

/* Border painting animations */
@keyframes paintTopBorder {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes paintLeftBorder {
    from { height: 0; }
    to { height: 100%; }
}

@keyframes paintRightBorder {
    from { height: 0; }
    to { height: 100%; }
}

@keyframes paintBottomBorder {
    from { width: 0; }
    to { width: 100%; }
}

/* Content fade in */
@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== Footer ===== */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(244, 196, 48, 0.1);
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer .footer-links {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

footer .footer-link {
    color: var(--text-muted);
    text-decoration: underline;
    transition: color 0.3s ease, opacity 0.3s ease;
    opacity: 0.6;
}

footer .footer-link:hover {
    color: var(--gold);
    opacity: 1;
}

footer .footer-separator {
    margin: 0 0.75rem;
    opacity: 0.5;
}

footer .footer-hint {
    opacity: 0.6;
    font-style: italic;
}

/* ===== Konami Hint Styling ===== */
.konami-hint {
    font-weight: 700;
    font-style: italic;
    text-decoration: underline;
    background: linear-gradient(
        110deg,
        var(--gold) 0%,
        rgba(255, 255, 255, 0.95) 45%,
        var(--gold) 55%,
        var(--gold) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: subtleShimmer 4s ease-in-out infinite;
    transition: all 0.3s ease;
    cursor: help;
    position: relative;
    display: inline-block;
}
/* Keep shimmer animation running on hover - don't interrupt it */

/* JavaScript-created tooltip */
/* Positioned fixed to avoid parent opacity inheritance issues */
.konami-tooltip {
    position: fixed;
    opacity: 0;
    visibility: hidden;
    font-family: system-ui, -apple-system, 'Segoe UI', 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    font-weight: 700;
    font-style: normal;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    color: #f4c430;
    background: #262624;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--gold);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateX(-50%) translateY(-100%) translateY(-5px);
    pointer-events: none;
    z-index: 10000;
    line-height: 1.4;
}

.konami-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-100%) translateY(0);
}

@keyframes subtleShimmer {
    0% {
        background-position: 200% 0;
    }
    50% {
        background-position: 0% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

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

@keyframes shine {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-visual {
        display: none;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .projects-grid {
        gap: 2rem;
    }
    
    .project-card:nth-child(2) {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }

    .hero-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-links {
        flex-direction: column;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline-header {
        flex-direction: column;
    }

    .timeline-content {
        gap: 1rem;
    }

    .company-logo {
        width: 38px;
        height: 38px;
    }
}