/* =============================================
   MARK FRIZAS PORTFOLIO — MAIN STYLESHEET
   Aesthetic: Dark-tech, refined cyberpunk, editorial
   ============================================= */

/* --- Design Tokens --- */
:root {
    --bg:          #080c14;
    --bg-2:        #0d1422;
    --bg-card:     #111827;
    --primary:     #3b82f6;
    --primary-dim: rgba(59,130,246,0.12);
    --accent:      #06b6d4;
    --danger:      #f43f5e;
    --text:        #e2e8f0;
    --text-muted:  #64748b;
    --border:      rgba(255,255,255,0.07);
    --glow:        0 0 60px rgba(59,130,246,0.15);
    --transition:  all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --radius:      16px;
    --success:     #34d399;
}

body.light-mode {
    --bg:          #f8fafc;
    --bg-2:        #f1f5f9;
    --bg-card:     #ffffff;
    --primary:     #2563eb;
    --primary-dim: rgba(37,99,235,0.1);
    --accent:      #0891b2;
    --danger:      #e11d48;
    --text:        #0f172a;
    --text-muted:  #64748b;
    --border:      rgba(0,0,0,0.1);
    --glow:        0 0 60px rgba(37,99,235,0.1);
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* --- Accessibility: skip link + keyboard focus --- */
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 2000;
    background: var(--primary); color: #fff;
    padding: 10px 18px; border-radius: 8px;
    font-family: 'Syne', sans-serif; font-weight: 700; text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus-visible { top: 12px; }

/* Scope focus rings to interactive elements so component styling is untouched. */
a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

body {
    font-family: 'Syne', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
}

.mono { font-family: 'DM Mono', monospace; font-size: 0.9em; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* --- NAVIGATION --- */
#navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    transition: var(--transition);
}

.nav-inner {
    display: flex; justify-content: space-between; align-items: center;
    padding: 22px 8%;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

#navbar.scrolled .nav-inner {
    background: rgba(8, 12, 20, 0.9);
    backdrop-filter: blur(16px);
    border-bottom-color: var(--border);
    padding: 14px 8%;
}

.logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800; font-size: 1.2rem;
    letter-spacing: -1px; color: var(--text);
    line-height: 1;
    transform-style: preserve-3d; will-change: transform;
}
.logo-dot { color: var(--primary); }

.nav-links { display: flex; list-style: none; gap: 36px; }
.nav-link {
    text-decoration: none; color: var(--text-muted);
    font-weight: 600; font-size: 0.9rem; letter-spacing: 0.5px;
    transition: color 0.3s ease; position: relative;
    display: inline-block; transform-style: preserve-3d;
    will-change: transform;
}
.nav-link::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--primary);
    transition: width 0.3s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
    display: block; width: 24px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Theme Toggle */
.theme-toggle {
    background: none; border: none;
    color: var(--text-muted); cursor: pointer;
    padding: 4px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); font-size: 1.1rem;
    margin-left: 8px; line-height: 1;
    align-self: center;
}
.theme-toggle:hover {
    color: var(--primary);
}

/* Mobile Menu */
.mobile-menu {
    display: none; background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 16px 0; max-height: 0;
    overflow: hidden; transition: max-height 0.4s ease;
}
.mobile-menu.open { max-height: 300px; }
.mobile-menu ul { list-style: none; text-align: center; }
.mobile-menu ul li { padding: 12px 0; }
.mob-link {
    text-decoration: none; color: var(--text-muted);
    font-size: 1rem; font-weight: 600; transition: 0.2s;
}
.mob-link:hover { color: var(--primary); }

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex; align-items: center;
    position: relative; overflow: hidden;
    padding-top: 100px;
}

/* Subtle grid background */
#particles-canvas {
    position: absolute; inset: 0;
    z-index: 0; pointer-events: none;
}

.hero-bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
    pointer-events: none;
}

.hero-glow {
    position: absolute; top: 20%; left: -10%;
    width: 500px; height: 500px; border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,0.12) 0%, transparent 70%);
    pointer-events: none; filter: blur(40px);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px; align-items: center;
    position: relative; z-index: 1;
}

/* Profile Image */
.hero-image { display: flex; flex-direction: column; align-items: center; gap: 20px; }

.img-frame {
    position: relative;
    width: 300px; height: 300px;
    transition: transform 0.15s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

.img-frame img {
    width: 100%; height: 100%;
    object-fit: cover; border-radius: 50%;
    border: 3px solid var(--border);
    position: relative; z-index: 1;
    transition: var(--transition);
}

.img-border-anim {
    position: absolute; inset: -6px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary), var(--accent), transparent, var(--primary));
    animation: spin 6s linear infinite;
    z-index: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.img-frame:hover img { transform: scale(1.04); }

.status-badge {
    display: flex; align-items: center; gap: 8px;
    background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.3);
    padding: 6px 16px; border-radius: 50px;
    font-size: 0.8rem; font-weight: 600; color: var(--accent);
    letter-spacing: 0.5px;
    transform-style: preserve-3d; will-change: transform;
}

@keyframes badgeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.cursor {
    display: inline-block;
    animation: blink 0.8s step-end infinite;
    color: var(--primary);
    font-family: 'DM Mono', monospace;
}
@keyframes blink {
    50% { opacity: 0; }
}
.pulse-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(6,182,212,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(6,182,212,0); }
}

/* Hero Text */
.hero-text { display: flex; flex-direction: column; gap: 20px; }

.eyebrow {
    color: var(--primary); font-size: 0.85rem;
    font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
}

.hero-text h1 {
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 800; line-height: 1.05;
    color: var(--text);
}

.name-highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description {
    color: var(--text-muted); font-size: 1rem;
    max-width: 540px; line-height: 1.8;
}
.description em { color: var(--text); font-style: normal; font-weight: 600; }

.social-icons { display: flex; gap: 16px; }
.social-icons a {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-muted); font-size: 1.1rem;
    text-decoration: none; transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    transform-style: preserve-3d; will-change: transform;
}
.social-icons a:hover {
    color: var(--primary); border-color: var(--primary);
    background: var(--primary-dim);
    transform: translateY(-4px);
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* Scroll hint */
.scroll-hint {
    position: absolute; bottom: 24px; left: 50%;
    transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center;
    animation: float 3s ease-in-out infinite;
}
.scroll-line {
    width: 1px; height: 40px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
}
@keyframes float {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

@keyframes ripple3d {
    to { transform: scale(3); opacity: 0; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.1); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

@keyframes navPulse {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    50% { text-shadow: 0 0 8px rgba(59,130,246,0.3); }
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes borderSpin {
    to { --angle: 360deg; }
}

/* --- BUTTONS --- */
.btn {
    padding: 13px 28px; border-radius: 10px;
    font-weight: 700; font-family: 'Syne', sans-serif;
    font-size: 0.9rem; letter-spacing: 0.3px;
    text-decoration: none; display: inline-flex;
    align-items: center; gap: 8px;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; border: 2px solid transparent;
    transform-style: preserve-3d; will-change: transform;
}
.btn.primary {
    background: var(--primary); color: white;
    border-color: var(--primary);
}
.btn.primary:hover {
    background: transparent; color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(59,130,246,0.3);
}
.btn.secondary {
    background: transparent; color: var(--text);
    border-color: var(--border);
}
.btn.secondary:hover {
    border-color: var(--primary); color: var(--primary);
    transform: translateY(-3px);
}

/* --- SECTION SHARED STYLES --- */
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag { color: var(--primary); font-size: 0.78rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; display: inline-block; transform-style: preserve-3d; will-change: transform; }
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin-bottom: 14px; }
.section-sub { color: var(--text-muted); font-size: 1rem; max-width: 500px; margin: 0 auto; }

/* --- SKILLS SECTION --- */
.skills-section {
    padding: 110px 0;
    background: var(--bg-2);
    position: relative;
}
.skills-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    display: flex; flex-direction: column;
    align-items: center; gap: 12px;
    text-align: center;
    transition: var(--transition); cursor: default;
    transform-style: preserve-3d;
    will-change: transform;
}

@keyframes float3d {
    0%, 100% { transform: translateY(0px) rotateX(0deg); }
    25% { transform: translateY(-6px) rotateX(2deg); }
    50% { transform: translateY(-2px) rotateX(-1deg); }
    75% { transform: translateY(-8px) rotateX(1deg); }
}
.skill-card i { font-size: 2rem; color: var(--primary); transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease; display: inline-block; }
.skill-card span { font-weight: 600; font-size: 0.85rem; color: var(--text-muted); transition: var(--transition); }

.skill-card:hover {
    border-color: var(--primary);
    background: var(--primary-dim);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(59,130,246,0.1);
}
.skill-card:hover i, .skill-card:hover span { color: var(--primary); }

.skill-stars {
    display: flex; gap: 2px; margin-top: 4px;
}
.skill-stars i {
    font-size: 0.65rem; color: #fbbf24;
}
.skill-stars i.empty {
    color: var(--border);
}

.skill-card.security i { color: var(--danger); }
.skill-card.security:hover { border-color: var(--danger); background: rgba(244,63,94,0.08); }
.skill-card.security:hover i, .skill-card.security:hover span { color: var(--danger); }

/* --- SERVICES SECTION --- */
.services-section {
    padding: 110px 0;
    background: var(--bg);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
    transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}
.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--glow);
}

.service-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: var(--primary-dim);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: 18px;
}

.service-card h3 {
    font-size: 1.1rem; font-weight: 700;
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.9rem; line-height: 1.7;
}

/* --- ACHIEVEMENTS SECTION --- */
.achievements-section {
    padding: 110px 0;
    background: var(--bg-2);
    position: relative;
}
.achievements-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.achievements-grid {
    display: grid;
    gap: 16px;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    display: flex; align-items: center; gap: 24px;
    transition: transform 0.2s ease, border-color 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}
.achievement-card:hover {
    border-color: var(--primary);
    transform: translateX(6px);
}

.achievement-icon {
    width: 54px; height: 54px; border-radius: 14px;
    background: rgba(251,191,36,0.12);
    color: #fbbf24;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}

.achievement-info h3 {
    font-size: 1rem; font-weight: 700;
    margin-bottom: 4px;
}

.achievement-info p {
    color: var(--text-muted);
    font-size: 0.88rem; line-height: 1.6;
}

@media (max-width: 960px) {
    .services-grid { grid-template-columns: 1fr; }
    .achievement-card { flex-direction: column; text-align: center; padding: 24px; }
}

/* --- ABOUT SECTION --- */
.about-section {
    padding: 110px 0;
    background: var(--bg);
    position: relative;
}

.about-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}
.about-text strong { color: var(--text); }

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 16px;
    text-align: center;
    transition: var(--transition);
}
.stat:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

@media (max-width: 960px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .about-stats { justify-items: center; }
}

@media (max-width: 640px) {
    .about-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .stat { padding: 20px 12px; }
    .stat-number { font-size: 1.4rem; }
}

/* --- PROJECTS SECTION --- */
.projects-section { padding: 110px 0; }

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}
.project-card:hover {
    border-color: rgba(59,130,246,0.3);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(59,130,246,0.15);
}

.project-image { position: relative; overflow: hidden; }
.project-image img {
    width: 100%; height: 230px;
    object-fit: cover; display: block;
    transition: transform 0.6s ease;
    filter: brightness(0.85) saturate(0.9);
}
.project-card:hover .project-image img { transform: scale(1.08); filter: brightness(0.7); }

.overlay {
    position: absolute; inset: 0;
    background: rgba(8,12,20,0.7);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.4s; z-index: 2;
}
.overlay span {
    color: white; font-weight: 700; font-size: 1rem;
    display: flex; align-items: center; gap: 8px;
    padding: 12px 24px; border: 2px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    transform: translateY(10px); transition: transform 0.4s ease;
}
.project-card:hover .overlay { opacity: 1; }
.project-card:hover .overlay span { transform: translateY(0); }

.project-tag {
    position: absolute; top: 16px; right: 16px; z-index: 3;
    background: rgba(8,12,20,0.8); backdrop-filter: blur(8px);
    color: var(--accent); font-size: 0.7rem; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 5px 12px; border-radius: 50px;
    border: 1px solid rgba(6,182,212,0.3);
    transform-style: preserve-3d; will-change: transform;
}

.project-status {
    position: absolute; top: 16px; left: 16px; z-index: 3;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.5px;
    text-transform: uppercase; padding: 4px 10px; border-radius: 50px;
    backdrop-filter: blur(8px);
    transform-style: preserve-3d; will-change: transform;
}
.project-status.live {
    background: rgba(52,211,153,0.15);
    color: var(--success);
    border: 1px solid rgba(52,211,153,0.3);
}
.project-status.dev {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.3);
}
.project-status.prod {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.3);
}

.project-info { padding: 28px; }
.project-info h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.project-info p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 18px; line-height: 1.7; }

.tech-used { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tech-used span {
    background: var(--primary-dim); color: var(--primary);
    font-size: 0.72rem; font-weight: 700; font-family: 'DM Mono', monospace;
    padding: 4px 10px; border-radius: 4px;
    border: 1px solid rgba(59,130,246,0.2);
    display: inline-block; transform-style: preserve-3d; will-change: transform;
    transition: background 0.2s ease;
}

.project-links {
    display: flex; align-items: center; gap: 10px;
}

.demo-btn {
    color: var(--text); font-weight: 700; text-decoration: none;
    font-size: 0.88rem;
    display: inline-flex; align-items: center; gap: 8px;
    transition: var(--transition);
}
.demo-btn i { font-size: 0.75rem; transition: transform 0.3s; color: var(--primary); }
.demo-btn:hover { color: var(--primary); }
.demo-btn:hover i { transform: translate(3px, -3px); }

.github-link {
    padding: 6px 10px; border-radius: 8px;
    background: var(--bg-2); border: 1px solid var(--border);
    font-size: 1rem;
}
.github-link i { font-size: 1rem; }
.github-link:hover { border-color: var(--primary); }
.github-link:hover i { transform: none; }

/* --- CONTACT SECTION --- */
.contact-section {
    padding: 110px 0;
    background: var(--bg-2);
    position: relative; overflow: hidden;
}
.contact-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.contact-glow {
    position: absolute; bottom: -100px; right: -100px;
    width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 60px; align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 24px; padding-top: 8px; }

.contact-item {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 20px; border-radius: var(--radius);
    transition: border-color 0.3s ease;
    transform-style: preserve-3d; will-change: transform;
}
.contact-item:hover { border-color: var(--primary); transform: translateX(6px); }
.contact-item i {
    font-size: 1.3rem; color: var(--primary);
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-dim); border-radius: 10px; flex-shrink: 0;
}
.contact-item .label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.contact-item a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: 0.2s; }
.contact-item a:hover { color: var(--primary); }

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-group label { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.form-group input,
.form-group textarea {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 13px 16px;
    color: var(--text);
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none; resize: none;
    transform-style: preserve-3d;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.submit-btn { width: 100%; justify-content: center; font-size: 1rem; margin-top: 4px; }
.form-status { text-align: center; margin-top: 14px; font-size: 0.9rem; font-weight: 600; min-height: 22px; }

/* --- FOOTER --- */
footer {
    padding: 36px 0;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
}
footer p { color: var(--text-muted); font-size: 0.85rem; }
.footer-socials { display: flex; gap: 14px; }
.footer-socials a {
    color: var(--text-muted); font-size: 1rem;
    text-decoration: none; transition: color 0.2s ease;
    display: inline-block; transform-style: preserve-3d; will-change: transform;
}
.footer-socials a:hover { color: var(--primary); }

/* --- REVEAL ANIMATIONS --- */
.reveal, .reveal-left, .reveal-right {
    opacity: 0; transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal { transform: translateY(40px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal.active, .reveal-left.active, .reveal-right.active {
    opacity: 1; transform: translate(0);
}

/* --- TIMELINE SECTION --- */
.timeline-section {
    padding: 110px 0;
    background: var(--bg-2);
    position: relative;
}
.timeline-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 40px;
}
.timeline::before {
    content: '';
    position: absolute; left: 15px; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
    padding-left: 40px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    position: absolute; left: -33px; top: 4px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-2);
    box-shadow: 0 0 0 2px var(--primary);
    transform-style: preserve-3d;
}

@keyframes pulse3d {
    0%, 100% { box-shadow: 0 0 0 2px var(--primary), 0 0 0 0 rgba(59,130,246,0.3); transform: scale(1); }
    50% { box-shadow: 0 0 0 2px var(--primary), 0 0 0 8px rgba(59,130,246,0); transform: scale(1.3); }
}

.timeline-date {
    font-family: 'DM Mono', monospace;
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* --- TESTIMONIALS SECTION --- */
.testimonials-section {
    padding: 110px 0;
    background: var(--bg);
    position: relative;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d; will-change: transform;
}
.testimonial-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--glow);
}

.testimonial-stars {
    color: #fbbf24;
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: flex;
    gap: 4px;
}

.testimonial-card > p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary-dim);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    font-size: 0.85rem;
}

.testimonial-author span {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- RESPONSIVE --- */
@media (max-width: 960px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .mobile-menu { display: block; }

    .hero-container { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-text { align-items: center; }
    .description { text-align: center; }
    .hero-btns { justify-content: center; }
    .social-icons { justify-content: center; }
    .img-frame { width: 240px; height: 240px; }

    .contact-wrapper { grid-template-columns: 1fr; gap: 40px; }
    .footer-inner { flex-direction: column; text-align: center; }

    .testimonials-grid { grid-template-columns: 1fr; }
    .about-content { grid-template-columns: 1fr; gap: 40px; text-align: center; }
}

@media (max-width: 640px) {
    .project-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: repeat(3, 1fr); }
    .contact-form { padding: 24px; }
    .timeline { padding-left: 20px; }
}

/* --- MAGNETIC BUTTON ENHANCE --- */
.btn { transition: transform 0.15s ease-out, color 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }

/* --- FIX LAYERING --- */
.hero { position: relative; z-index: 1; }
.hero-container { position: relative; z-index: 2; }
#three-container { z-index: 0 !important; }
canvas[style*="position:absolute"][style*="inset:0"] { z-index: 0 !important; }

/* --- LIGHT MODE SECTION WAVE ADAPT --- */
body.light-mode .section-wave path { fill: #f8fafc !important; }

/* --- SHIMMER OVERRIDE --- */
.project-image { overflow: hidden; }

/* --- LIGHT MODE FIXES --- */
body.light-mode .skill-card i,
body.light-mode .service-icon,
body.light-mode .contact-item i { color: var(--primary); }

/* --- ANIMATED BORDER FALLBACK --- */
@supports not (--angle: 0deg) {
    .project-card > div:first-child { display: none !important; }
}

/* --- FIX SCROLL PARALLAX CONFLICTS --- */
.service-card, .timeline-item { transition: transform 0.3s ease, border-color 0.3s ease !important; }

/* --- RESPECT REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
    .glitch-trigger:hover { animation: none !important; }
}

/* --- ACCESSIBILITY: respect reduced-motion preference --- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    /* Reveal-on-scroll elements must stay visible without their transition. */
    .reveal, .reveal-left, .reveal-right,
    .skill-card, .project-card, .contact-item, .timeline-item, .testimonial-card {
        opacity: 1 !important;
        transform: none !important;
    }
    .scroll-hint { display: none; }
}