/* ========================================
   COSMIC PORTFOLIO — Custom Properties
   ======================================== */
:root {
    --bg-deep: #06060c;
    --bg-surface: #0d0d16;
    --bg-elevated: #14141f;
    --bg-card: #1a1a28;

    --cyan: #b48eff;
    --magenta: #ff6b9d;
    --amber: #ffd166;
    --cyan-dim: #b48eff33;
    --magenta-dim: #ff6b9d33;
    --amber-dim: #ffd16633;

    --text-primary: #e8eaf0;
    --text-secondary: #8b8fa8;
    --text-muted: #555870;

    --font-display: 'Syne', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

::selection {
    background: var(--cyan);
    color: var(--bg-deep);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background-image: radial-gradient(ellipse at 20% 50%, rgba(180, 142, 255, 0.02) 0%, transparent 50%),
                      radial-gradient(ellipse at 80% 20%, rgba(255, 107, 157, 0.015) 0%, transparent 40%);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

/* ========================================
   Particle Canvas
   ======================================== */
#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    background: linear-gradient(to bottom, var(--bg-deep), transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}

.nav.scrolled {
    padding: 0.8rem 2rem;
    background: rgba(6, 6, 12, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--magenta), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.nav-logo::after {
    content: '·';
    position: absolute;
    top: -2px;
    right: -8px;
    font-size: 0.6rem;
    background: var(--magenta);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    position: relative;
    padding: 0.25rem 0;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cyan);
    transition: var(--transition-smooth);
    border-radius: 1px;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* ========================================
   Sections — General
   ======================================== */
.section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Reveal Animations
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* ========================================
   Hero Section
   ======================================== */
.hero {
    justify-content: center;
    align-items: flex-start;
    padding-top: 8rem;
    min-height: 100vh;
}

.hero-content {
    max-width: 800px;
}

.hero-greeting {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-line {
    display: block;
    width: 48px;
    height: 2px;
    background: var(--cyan);
}

.hero-tag {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-first {
    display: block;
    color: var(--text-primary);
}

.hero-last {
    display: block;
    background: linear-gradient(135deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-last::after {
    content: '✦';
    display: inline-block;
    font-size: 0.3em;
    vertical-align: super;
    margin-left: 0.3em;
    background: linear-gradient(135deg, var(--magenta), var(--amber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.6; transform: scale(1) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(15deg); }
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.waka-stats {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.waka-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.waka-value {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.waka-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.waka-attribution {
    width: 100%;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.waka-attribution a {
    color: var(--magenta);
    transition: var(--transition-fast);
}

.waka-attribution a:hover {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), #8b5cf6);
    color: var(--bg-deep);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--cyan-dim);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.btn-ghost:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    transform: translateY(-2px);
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ========================================
   Skills Section
   ======================================== */
.skills-section {
    min-height: auto;
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.skills-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

.legend-skilled {
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan-dim);
}

.legend-comfortable {
    background: var(--magenta);
    box-shadow: 0 0 12px var(--magenta-dim);
}

.legend-familiar {
    background: var(--amber);
    box-shadow: 0 0 12px var(--amber-dim);
}

/* Subtle flourish — geometric bloom behind skill grid */
.skills-grid::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(180, 142, 255, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.skills-grid {
    position: relative;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill-orb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    cursor: default;
    transition: var(--transition-spring);
}

.skill-orb:hover {
    transform: scale(1.15);
}

.skill-orb.skilled {
    background: radial-gradient(circle at 30% 30%, rgba(180, 142, 255, 0.2), rgba(180, 142, 255, 0.05));
    border: 1.5px solid rgba(180, 142, 255, 0.4);
    box-shadow: 0 0 30px rgba(180, 142, 255, 0.1);
}

.skill-orb.skilled:hover {
    box-shadow: 0 0 50px rgba(180, 142, 255, 0.3);
    border-color: var(--cyan);
}

.skill-orb.comfortable {
    background: radial-gradient(circle at 30% 30%, rgba(255, 107, 157, 0.2), rgba(255, 107, 157, 0.05));
    border: 1.5px solid rgba(255, 107, 157, 0.4);
    box-shadow: 0 0 30px rgba(255, 107, 157, 0.1);
    width: 105px;
    height: 105px;
}

.skill-orb.comfortable:hover {
    box-shadow: 0 0 50px rgba(255, 107, 157, 0.3);
    border-color: var(--magenta);
}

.skill-orb.familiar {
    background: radial-gradient(circle at 30% 30%, rgba(255, 209, 102, 0.2), rgba(255, 209, 102, 0.05));
    border: 1.5px solid rgba(255, 209, 102, 0.4);
    box-shadow: 0 0 30px rgba(255, 209, 102, 0.1);
    width: 90px;
    height: 90px;
}

.skill-orb.familiar:hover {
    box-shadow: 0 0 50px rgba(255, 209, 102, 0.3);
    border-color: var(--amber);
}

.orb-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition-smooth);
}

.skill-orb.skilled .orb-glow {
    background: radial-gradient(circle, var(--cyan-dim), transparent 70%);
}

.skill-orb.comfortable .orb-glow {
    background: radial-gradient(circle, var(--magenta-dim), transparent 70%);
}

.skill-orb.familiar .orb-glow {
    background: radial-gradient(circle, var(--amber-dim), transparent 70%);
}

.skill-orb:hover .orb-glow {
    opacity: 1;
    transform: scale(1.5);
}

.orb-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.02em;
    z-index: 1;
}

/* ========================================
   Projects Section
   ======================================== */
.projects-section {
    min-height: auto;
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition-fast);
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: rgba(0, 232, 255, 0.1);
    border-color: var(--cyan);
    color: var(--cyan);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    perspective: 1000px;
    height: 360px;
    min-height: 360px;
    max-height: 360px;
}

.project-card.hidden {
    display: none;
}

.project-card-inner {
    position: relative;
    width: 100%;
    height: 360px;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
    border-radius: var(--radius-md);
}

.project-card:hover .project-card-inner {
    transform: rotateY(180deg);
}

.project-card-front,
.project-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-md);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg-card);
    overflow: hidden;
}

.project-card-front {
    overflow: hidden;
    position: relative;
}

.project-card-back {
    transform: rotateY(180deg);
    justify-content: center;
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.06);
}

.project-card-back h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent, var(--cyan));
}

.project-card-back .project-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-card-back ul.project-description {
    padding-left: 1.2rem;
    margin-top: -1rem;
    margin-bottom: 0.5rem;
}

.project-card-back ul.project-description li {
    margin-bottom: 0.2rem;
}

.demo-modal-trigger {
    color: var(--accent, var(--cyan));
    text-decoration: underline;
    cursor: pointer;
}

.demo-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.demo-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.demo-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.demo-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.demo-modal-close {
    position: absolute;
    top: -2rem;
    right: -0.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.demo-modal-close:hover {
    opacity: 1;
}

.demo-modal-video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-visual {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent) 5%, transparent));
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    color: var(--accent);
}

.project-icon {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.project-date {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.project-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    line-height: 1;
}

.project-badge-ai {
    background: rgba(99, 179, 237, 0.1);
    border-color: rgba(99, 179, 237, 0.4);
    color: #63b3ed;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-brief {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: auto;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

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

.project-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.project-link:hover {
    color: var(--accent, var(--cyan));
}

.project-link-repo {
    color: var(--text-secondary);
}

.project-link-repo:hover {
    color: var(--accent, var(--amber));
}

/* ========================================
   Resume Section
   ======================================== */
.resume-section {
    min-height: auto;
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.resume-container {
    max-width: 700px;
    margin: 0 auto;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--magenta), var(--cyan), var(--amber), transparent);
}

.timeline-group {
    margin-bottom: 2rem;
    margin-top: 3rem;
}

.timeline-group:first-child {
    margin-top: 0;
}

.timeline-group-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 2px solid var(--cyan);
    transform: translateX(-50%);
    transition: var(--transition-fast);
}

.timeline-item:hover .timeline-marker {
    background: var(--cyan);
    box-shadow: 0 0 15px var(--cyan-dim);
}

.timeline-content {
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition-fast);
}

.timeline-content:hover {
    border-color: rgba(255, 107, 157, 0.2);
    transform: translateX(4px);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.timeline-role {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.timeline-company {
    color: var(--cyan);
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-top: 0.75rem;
    line-height: 1.7;
}

.internships-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.intern-card {
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition-fast);
}

.intern-card:hover {
    border-color: rgba(255, 107, 157, 0.2);
    transform: translateY(-2px);
}

.intern-date {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.intern-role {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 0.2rem;
    line-height: 1.3;
}

.intern-company {
    color: var(--magenta);
    font-size: 0.78rem;
    font-weight: 500;
}

.education-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}

.edu-card {
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition-fast);
}

.edu-card:hover {
    border-color: rgba(180, 142, 255, 0.2);
    transform: translateY(-2px);
}

.edu-degree {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

.edu-school {
    color: var(--cyan);
    font-size: 0.78rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .internships-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .education-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.resume-download {
    text-align: center;
    margin-top: 3rem;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-section {
    min-height: auto;
    padding-top: 8rem;
    padding-bottom: 8rem;
    text-align: center;
}

.contact-text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-weight: 500;
    transition: var(--transition-fast);
}

.contact-link:hover {
    border-color: var(--magenta);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(255, 107, 157, 0.1);
}

.contact-icon {
    font-size: 1.25rem;
    color: var(--cyan);
}

.contact-icon-svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--cyan);
    flex-shrink: 0;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-sparkle {
    display: inline-block;
    font-size: 1rem;
    cursor: pointer;
    color: var(--cyan);
    transition: transform var(--transition-fast), color 0.4s ease;
    animation: sparkle 3s ease-in-out infinite;
}

.footer-sparkle:hover {
    animation: sparkle-colors 1.2s ease-in-out infinite;
    transform: scale(1.4);
}

.footer-sparkle:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
    border-radius: 2px;
}

@keyframes sparkle-colors {
    0%, 100% { color: var(--cyan); transform: scale(1.4) rotate(0deg); }
    33% { color: var(--magenta); transform: scale(1.6) rotate(15deg); }
    66% { color: var(--amber); transform: scale(1.4) rotate(-15deg); }
}

.stem-modal .demo-modal-backdrop {
    background: var(--bg-deep);
    z-index: 0;
}

.stem-modal-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.stem-modal .demo-modal-content {
    position: relative;
    z-index: 2;
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stem-modal .demo-modal-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 3;
    font-size: 2.5rem;
    opacity: 0.8;
}

.stem-modal .demo-modal-close:hover {
    opacity: 1;
}

.stem-modal-img {
    position: relative;
    max-width: 70vw;
    max-height: 85vh;
    border-radius: var(--radius-md);
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 80vw);
        height: 100vh;
        flex-direction: column;
        background: var(--bg-surface);
        padding: 5rem 2rem;
        gap: 1.5rem;
        transition: var(--transition-smooth);
        border-left: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .section {
        padding: 4rem 1.25rem;
    }

    .hero {
        padding-top: 6rem;
    }

    .hero-name {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
    }

    .waka-stats {
        gap: 1.25rem;
        flex-wrap: wrap;
    }

    .waka-value {
        font-size: 1rem;
    }

    .skills-grid {
        gap: 1rem;
    }

    .skill-orb {
        width: 90px;
        height: 90px;
    }

    .skill-orb.comfortable {
        width: 80px;
        height: 80px;
    }

    .skill-orb.familiar {
        width: 70px;
        height: 70px;
    }

    .orb-label {
        font-size: 0.62rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        height: 340px;
        min-height: 340px;
        max-height: 340px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .timeline {
        padding-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }

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

    .skills-legend {
        gap: 1rem;
    }

    .projects-filter {
        gap: 0.35rem;
    }

    .filter-btn {
        padding: 0.4rem 0.9rem;
        font-size: 0.78rem;
    }
}

/* ========================================
   Accessibility — Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }

    .project-card:hover .project-card-inner {
        transform: none;
    }

    .project-card-back {
        transform: none;
        position: relative;
        backface-visibility: visible;
    }
}

/* Focus styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 4px;
    border-radius: 4px;
}
