/* =======================
   GLOBAL RESET & ROOT VARIABLES
   ======================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #04050e;
    --bg2: #060814;
    --surface: rgba(100,180,255,0.04);
    --surface2: rgba(100,180,255,0.075);
    --border: rgba(0, 245, 255, 0.14);
    --border-hot: rgba(0, 245, 255, 0.38);
    --text: #eef6ff;
    --text-muted: rgba(170,215,255,0.65);
    --accent: #00f5ff;
    --accent2: #ff2d78;
    --accent3: #7b2fff;
    --glow-cyan: 0 0 20px rgba(0,245,255,0.4), 0 0 60px rgba(0,245,255,0.15);
    --glow-pink: 0 0 20px rgba(255,45,120,0.4), 0 0 60px rgba(255,45,120,0.15);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* Custom cursor */
*, *::before, *::after { cursor: none !important; }

.cursor {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s;
    box-shadow: var(--glow-cyan);
    mix-blend-mode: screen;
}

.cursor-ring {
    width: 32px; height: 32px;
    border: 1px solid rgba(0,245,255,0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99998;
    transition: all 0.12s ease;
    mix-blend-mode: screen;
}

body {
    padding-top: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Exo 2', sans-serif;
    overflow-x: hidden;
    max-width: 100vw;
}

/* ── GRAIN OVERLAY ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9990;
    opacity: 0.6;
}

/* ── SCANLINES removed ── */

.container { padding: 0 8%; max-width: 1400px; margin: 0 auto; }

/* =======================
   NAVIGATION
   ======================= */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 80px);
    max-width: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 40px;
    background: rgba(4, 4, 15, 0.75);
    border: 1px solid var(--border);
    border-radius: 14px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 1000;
    box-shadow: 0 0 40px rgba(0,245,255,0.06), inset 0 1px 0 rgba(255,255,255,0.04);
}

nav::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.4;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 44px;
}

nav ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s;
}

nav ul li a:hover { color: var(--accent); text-shadow: var(--glow-cyan); }

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0; height: 1px;
    background: var(--accent);
    bottom: -6px; left: 0;
    transition: width 0.35s ease;
    box-shadow: var(--glow-cyan);
}

nav ul li a:hover::after { width: 100%; }

.nav-logo-left {
    position: absolute;
    left: 24px;
    display: flex;
    align-items: center;
}

.nav-logo-left img {
    width: 36px;
    height: auto;
    filter: drop-shadow(0 0 6px rgba(0,245,255,0.3));
    transition: all 0.3s ease;
}

.nav-logo-left img:hover {
    transform: scale(1.15) rotate(8deg);
    filter: drop-shadow(0 0 20px var(--accent));
}

/* hamburger */
.fa-bars, .fa-circle-xmark {
    display: none;
    color: var(--accent);
    font-size: 1.4rem;
}

/* =======================
   HERO SECTION
   ======================= */
#header {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

/* animated corner brackets */
#header::before, #header::after {
    content: '';
    position: absolute;
    width: 80px; height: 80px;
    border-color: var(--accent);
    border-style: solid;
    opacity: 0.3;
}
#header::before { top: 12%; left: 8%; border-width: 2px 0 0 2px; animation: cornerPulse 3s ease-in-out infinite; }
#header::after  { bottom: 12%; right: 8%; border-width: 0 2px 2px 0; animation: cornerPulse 3s ease-in-out infinite 1.5s; }

@keyframes cornerPulse {
    0%,100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

.hero-text {
    text-align: center;
    z-index: 5;
    position: relative;
}

/* wrapper that puts "Hi, I'm" + "SaiRam + char" on same line */
.hero-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    margin: 16px 0 24px;
    animation: fadeSlideUp 1s ease 0.2s both;
}

.hero-name-row h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3rem, 7.5vw, 7rem);
    font-weight: 900;
    line-height: 1;
    margin: 0;
    animation: none;
    white-space: nowrap;
}

.hero-name-row h1 .hi-part {
    color: #ffffff;
}

/* char sits right after SaiRam text */
.back-char {
    position: relative;
    right: auto;
    bottom: auto;
    top: auto;
    width: clamp(80px, 8vw, 130px);
    height: auto;
    z-index: 2;
    opacity: 0.95;
    pointer-events: none;
    filter: drop-shadow(0 0 20px rgba(0,245,255,0.4));
    flex-shrink: 0;
    align-self: flex-end;
    margin-bottom: -8px;
}
.role::after {
    content: "|";
    animation: blink 0.8s infinite;
    margin-left: 5px;
    color: var(--accent);
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.role {
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 8px;
    margin-bottom: 24px;
    text-shadow: var(--glow-cyan);
    font-weight: 500;
    text-transform: uppercase;
    animation: fadeSlideDown 1s ease both;
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ue-logo-pop {
    margin-bottom: 16px;
    animation: float 3.5s infinite ease-in-out;
    display: block;
    margin: 0 auto 20px;
    transition: transform 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
}

.ue-logo-pop:hover {
    transform: scale(1.3) rotate(10deg);
    filter: drop-shadow(0 0 30px var(--accent));
}

@keyframes float {
    0%,100% { transform: translateY(0); filter: drop-shadow(0 0 8px var(--accent)); }
    50%      { transform: translateY(-12px); filter: drop-shadow(0 0 30px var(--accent)); }
}

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

.tagline {
    font-size: 1.15rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    animation: fadeSlideUp 1s ease 0.4s both;
}

/* GLITCH — subtle, readable */
.glitch {
    color: var(--accent);
    position: relative;
    animation: glitch 8s infinite;
    background: transparent !important;
    text-shadow: 0 0 18px rgba(0,245,255,0.35);
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute; top:0; left:0;
    width:100%; height:100%;
    opacity: 0;
}
/* only flash briefly at 95% of the 8s cycle */
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent2);
    animation: glitch-anim 8s infinite;
    clip: rect(0,9999px,0,0);
}
.glitch::after {
    left: -2px;
    text-shadow: 2px 0 var(--accent3);
    animation: glitch-anim2 8s infinite;
    clip: rect(0,9999px,0,0);
}
/* main element only nudges very briefly */
@keyframes glitch {
    0%,93%,100% { transform: translate(0); }
    94%          { transform: translate(-2px, 1px); }
    95%          { transform: translate(2px, -1px); }
    96%          { transform: translate(0); }
}
/* pseudo elements flash opacity on during the same window */
@keyframes glitch-anim {
    0%,93%       { opacity:0; clip:rect(0,9999px,0,0); }
    94%          { opacity:0.7; clip:rect(30px,9999px,55px,0); }
    95%          { opacity:0.5; clip:rect(70px,9999px,90px,0); }
    96%,100%     { opacity:0; clip:rect(0,9999px,0,0); }
}
@keyframes glitch-anim2 {
    0%,93%       { opacity:0; clip:rect(0,9999px,0,0); }
    94%          { opacity:0.5; clip:rect(80px,9999px,100px,0); }
    95%          { opacity:0.4; clip:rect(20px,9999px,45px,0); }
    96%,100%     { opacity:0; clip:rect(0,9999px,0,0); }
}

/* Scroll indicator */
.scroll-hint {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    animation: bounce 2s infinite;
}
.scroll-hint span {
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    font-family: 'Exo 2', sans-serif;
}
.scroll-hint i { color: var(--accent); font-size: 0.8rem; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0);} 50%{transform:translateX(-50%) translateY(6px);} }

/* =======================
   BACKGROUND CANVAS
   ======================= */
#scroll-animation {
    position: fixed;
    top:0; left:0;
    width:100vw; height:100vh;
    z-index: -3;
    opacity: .85;
}

/* =======================
   SECTION HEADERS
   ======================= */
.subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3.8rem);
    text-align: center;
    margin-bottom: 70px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent3) 50%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.subtitle::after {
    content: '';
    display: block;
    width: 60px; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    margin: 16px auto 0;
    border-radius: 2px;
    box-shadow: var(--glow-cyan);
}

/* =======================
   ABOUT SECTION
   ======================= */
#about {
    padding: 160px 0;
    min-height: 100vh;
    position: relative;
}

/* section side glow */
#about::before {
    content: '';
    position: absolute;
    left: -200px; top: 30%;
    width: 400px; height: 400px;
    
    pointer-events: none;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    align-items: flex-start;
    justify-content: center;
}

.about-col-2 { flex: 1; min-width: 320px; }

/* video wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    
}
.video-wrapper iframe {
    position: absolute;
    top:0; left:0;
    width:100%; height:100%;
}

/* dotted list */
.dotted-list { list-style: none; margin: 40px 0; }
.dotted-list li {
    margin: 18px 0;
    padding-left: 32px;
    position: relative;
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.88);
}
.dotted-list li::before {
    content: "▹";
    color: var(--accent);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* ── TABS ── */
.tab-titles {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 40px 0 24px;
    padding: 5px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
}
.tab-titles::-webkit-scrollbar { display: none; }

.tab-links {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: capitalize;
    color: var(--text-muted);
    padding: 10px 26px;
    cursor: none;
    border-radius: 50px;
    border: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
    bottom: 0;
    background: transparent;
}

.tab-links:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.active-link {
    color: #04040a !important;
    background: var(--accent) !important;
    text-shadow: none !important;
    box-shadow: 0 0 20px rgba(0,245,255,0.45);
    font-weight: 700;
}

.tab-video { display: none; }

.tab-contents { display: none; margin-top: 28px; }
.active-tab { display: block; animation: tabFade 0.4s ease; }
@keyframes tabFade { from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:translateY(0);} }

/* ── CAROUSEL ── */
.carousel-wrapper {
    position: relative;
    padding: 0 22px;
    max-width: 100%;
}

.horizontal-scroller {
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 8px 4px 16px;
    max-width: 100%;
}
.horizontal-scroller::-webkit-scrollbar { display: none; }

.scroll-container {
    display: flex;
    gap: 16px;
    width: max-content;
}

.carousel-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(0,245,255,0.08);
    border: 1px solid var(--border-hot);
    color: var(--accent);
    width: 34px; height: 34px;
    border-radius: 8px;
    font-size: 0.8rem;
    display: flex; align-items:center; justify-content:center;
    z-index: 10;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}
.carousel-arrow:hover {
    background: rgba(0,245,255,0.18);
    box-shadow: var(--glow-cyan);
    transform: translateY(-50%) scale(1.05);
}
.carousel-arrow.left  { left: 0; }
.carousel-arrow.right { right: 0; }

/* ── CARDS (shared) ── */
.skill-card, .experience-card, .certification-card, .project-card {
    min-width: 280px;
    max-width: 320px;
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px;
    scroll-snap-align: start;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before, .experience-card::before,
.certification-card::before, .project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-card:hover, .experience-card:hover,
.certification-card:hover, .project-card:hover {
    border-color: var(--border-hot);
    background: var(--surface2);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,245,255,0.08), var(--glow-cyan);
}

.skill-card:hover::before, .experience-card:hover::before,
.certification-card:hover::before, .project-card:hover::before {
    opacity: 1;
}

.skill-card h3, .experience-card h3,
.certification-card h3, .project-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.skill-card ul, .experience-card ul, .project-card ul {
    list-style: none;
    margin-top: 4px;
}
.skill-card ul li, .experience-card ul li, .project-card ul li {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.88);
    padding: 5px 0;
    padding-left: 16px;
    position: relative;
    line-height: 1.6;
}
.skill-card ul li::before,
.experience-card ul li::before,
.project-card ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.experience-card { min-width: 340px; max-width: 380px; }
.project-card    { min-width: 340px; max-width: 400px; }

.company {
    font-size: 0.8rem;
    color: var(--accent2);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.company a { color: inherit; text-decoration: none; }
.company a:hover { text-shadow: var(--glow-pink); }

.tech {
    font-size: 0.75rem;
    color: var(--accent3);
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.git-icon-link {
    position: absolute;
    top: 22px; right: 22px;
    font-size: 1.1rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}
.git-icon-link:hover { color: var(--accent); text-shadow: var(--glow-cyan); }

.issuer {
    font-size: 0.78rem;
    color: var(--accent3);
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* coming soon cards */
.coming-soon {
    min-width: 200px !important;
    max-width: 200px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-style: dashed !important;
    border-color: rgba(0,245,255,0.2) !important;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.coming-soon span {
    display: block;
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 2px;
    margin-top: 6px;
}

/* =======================
   GAMES SECTION
   ======================= */
#games {
    padding: 120px 0;
    position: relative;
}

#games::after {
    content: '';
    position: absolute;
    right: -150px; top: 20%;
    width: 400px; height: 400px;
   
    pointer-events: none;
}

.game-card {
    min-width: 480px;
    max-width: 560px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    scroll-snap-align: start;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover {
    
   
    transform: translateY(-6px);
}
.game-card:hover::before { opacity: 1; }

.game-card .fa-gamepad {
    font-size: 2rem;
    color: var(--accent2);
    margin-bottom: 14px;
    display: block;
    text-shadow: var(--glow-pink);
}

.game-card h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 10px;
}

.game-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* =======================
   BUTTONS
   ======================= */
.btn.neon-btn {
    display: inline-block;
    padding: 12px 28px;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    background: transparent;
    margin-bottom: 16px;
}

.btn.neon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: translateX(-101%);
    transition: transform 0.3s ease;
    z-index: -1;
}

.btn.neon-btn:hover {
    color: var(--bg);
    box-shadow: var(--glow-cyan);
}
.btn.neon-btn:hover::before { transform: translateX(0); }

.btn.neon-btn.large { padding: 16px 40px; font-size: 0.9rem; }

/* =======================
   PORTFOLIO / SCREENSHOTS SECTION
   ======================= */
#portfolio { padding: 120px 0; }

.portfolio-card {
    min-width: 520px;
    max-width: 620px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    scroll-snap-align: start;
    transition: all 0.3s;
}

.portfolio-card:hover {
    border-color: var(--border-hot);
    box-shadow: 0 12px 40px rgba(0,245,255,0.07);
}

.portfolio-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.screenshot-img {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.screenshot-img:hover {
    border-color: var(--accent);
    transform: scale(1.5);
    box-shadow: var(--glow-cyan);
    z-index: 1;
    position: relative;
}

.screenshot-grid2 {
    display: grid;
    grid-template-columns: repeat(2, 6fr);
    gap: 18px;
}
.screenshot-img2 {
    width: 100%;
    aspect-ratio: 16/9;
    
    border-radius: 8px;
    border: px solid var(--border);
    transition: all 0.3s;
}

.screenshot-img2:hover {
    border-color: var(--accent);
    transform: scale(1.6);
    box-shadow: var(--glow-cyan);
    z-index: 1;
    position: relative;
}

/* =======================
   CONTACT SECTION
   ======================= */
#contact {
    padding: 120px 0 80px;
    position: relative;
}

#contact::before {
    content: '';
    position: absolute;
    left: 50%; top: 10%;
    transform: translateX(-50%);
    width: 600px; height: 300px;
    background: radial-gradient(ellipse, rgba(123,47,255,0.07) 0%, transparent 70%);
    pointer-events: none;
}

.contact-left { flex: 0 0 340px; }

.contact-left h1 { text-align: left; }
.contact-left h1::after { margin-left: 0; }

.contact-left p {
    font-size: 1rem;
    margin: 14px 0;
    color: var(--text-muted);
}

.contact-left p i {
    color: var(--accent);
    margin-right: 10px;
    width: 18px;
    text-align: center;
}

.contact-left p a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.contact-left p a:hover { color: var(--accent); }

.social-icons {
    display: flex;
    gap: 16px;
    margin: 28px 0;
}

.social-icons a {
    width: 44px; height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex; align-items:center; justify-content:center;
    color: var(--text-muted);
    font-size: 1.15rem;
    text-decoration: none;
    transition: all 0.3s;
    background: var(--surface);
}

.social-icons a:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: var(--glow-cyan);
    transform: translateY(-3px);
}

.contact-right { flex: 1; min-width: 300px; }

.contact-right form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-right input,
.contact-right textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    color: var(--text);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s;
    outline: none;
    resize: none;
}

.contact-right input::placeholder,
.contact-right textarea::placeholder { color: var(--text-muted); }

.contact-right input:focus,
.contact-right textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0,245,255,0.1);
    background: rgba(0,245,255,0.03);
}

#msg {
    font-size: 0.85rem;
    color: var(--accent);
    text-align: center;
    display: block;
    margin-top: 6px;
}

/* =======================
   TABLET (max 1024px)
   ======================= */
@media (max-width: 1024px) {
    .container { padding: 0 5%; }
    nav { width: calc(100% - 48px); }
    .game-card { min-width: 400px; }
    .portfolio-card { min-width: 420px; }
}

/* =======================
   MOBILE (max 768px)
   ======================= */
@media (max-width: 768px) {

    /* Hide custom cursor on touch devices */
    .cursor, .cursor-ring { display: none; }
    *, *::before, *::after { cursor: auto !important; }

    .container {
        padding: 0 5%;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    #about, #games, #portfolio, #contact {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* ── NAV ── */
    nav {
        top: 0; left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        padding: 18px 5%;
        justify-content: center;
        transform: none;
        position: fixed;
        min-height: 64px;
    }

    /* logo pinned left */
    .nav-logo-left {
        position: absolute;
        left: 5%;
        right: auto;
    }

    .nav-logo-left img { width: 38px; }

    /* hamburger pinned right */
    .fa-bars {
        display: block;
        font-size: 1.5rem;
        position: absolute;
        right: 5%;
    }

    #sidemenu {
        position: fixed;
        top: 0; right: -100%;
        height: 100vh;
        width: 75vw;
        max-width: 300px;
        background: rgba(4,5,18,0.98);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-left: 1px solid var(--border);
        flex-direction: column;
        display: flex;
        padding: 80px 32px 32px;
        transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
        z-index: 2000;
        gap: 0;
        list-style: none;
    }

    #sidemenu li { margin: 14px 0; }
    #sidemenu li a {
        font-size: 1.2rem;
        letter-spacing: 3px;
        color: var(--text-muted);
    }
    #sidemenu li a:hover { color: var(--accent); }

    #sidemenu .fa-circle-xmark {
        display: block;
        position: absolute;
        top: 24px; right: 24px;
        font-size: 1.6rem;
        cursor: pointer !important;
    }

    /* ── HERO ── */
    #header {
        min-height: 100svh;
        padding-top: 80px;
        overflow: visible;
    }

    .ue-logo-pop {
        overflow: visible;
        position: relative;
        z-index: 10;
    }

    /* show character on mobile — move below tagline */
    .back-char {
        display: block;
        width: clamp(80px, 20vw, 110px);
        position: absolute;
        right: 16px;
        bottom: 80px;
        top: auto;
        left: auto;
    }

    .hero-name-row {
        gap: 6px;
    }

    .hero-name-row h1 {
        font-size: clamp(2.4rem, 11vw, 4rem);
        margin: 0;
        white-space: nowrap;
    }

    .role {
        font-size: 0.72rem;
        letter-spacing: 5px;
    }

    .tagline {
        font-size: 1rem;
        padding: 0 8px;
    }

    .ue-logo-pop { width: 110px; }

    /* corner brackets — hide on small screens */
    #header::before, #header::after { display: none; }

    /* ── SECTIONS ── */
    #about  { padding: 80px 0 60px; }
    #games  { padding: 80px 0; }
    #portfolio { padding: 80px 0; }
    #contact   { padding: 80px 0 60px; }

    .subtitle {
        font-size: clamp(1.8rem, 8vw, 2.6rem);
        margin-bottom: 44px;
    }

    /* ── TABS ── */
    .tab-titles {
        gap: 2px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding: 4px;
        border-bottom: none;
        flex-wrap: nowrap;
    }
    .tab-titles::-webkit-scrollbar { display: none; }

    .tab-links {
        font-size: 0.68rem;
        letter-spacing: 0.5px;
        padding: 8px 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* ── CARDS ── */
    .skill-card, .certification-card {
        min-width: calc(85vw - 32px);
        max-width: calc(85vw - 32px);
    }
    .experience-card, .project-card {
        min-width: calc(88vw - 32px);
        max-width: calc(88vw - 32px);
    }
    .game-card {
        min-width: calc(88vw - 32px);
        max-width: calc(88vw - 32px);
    }
    .portfolio-card {
        min-width: calc(88vw - 32px);
        max-width: calc(88vw - 32px);
    }

    .skill-card ul li,
    .experience-card ul li,
    .project-card ul li { font-size: 0.95rem; }

    /* ── CAROUSEL ARROWS ── */
    .carousel-arrow { width: 30px; height: 30px; font-size: 0.7rem; }
    .carousel-arrow.left  { left: 0; }
    .carousel-arrow.right { right: 0; }

    /* ── ABOUT row ── */
    .row { gap: 32px; }
    .about-col-2 { min-width: 100%; }

    /* ── CONTACT ── */
    .contact-left  { flex: 0 0 100%; }
    .contact-right { min-width: 100%; }

    .contact-right input,
    .contact-right textarea { font-size: 1rem; padding: 13px 16px; }

    /* ── DOTTED LIST ── */
    .dotted-list li { font-size: 1.05rem; }

    /* ── VIDEO ── */
    .video-wrapper { margin-bottom: 32px !important; }
}

/* =======================
   SMALL PHONES (max 400px)
   ======================= */
@media (max-width: 400px) {
    .hero-text h1 { font-size: clamp(2.4rem, 15vw, 3.2rem); }
    .tab-links { font-size: 0.62rem; padding: 8px 10px; }
    .skill-card, .experience-card, .project-card,
    .game-card, .portfolio-card, .certification-card {
        min-width: calc(92vw - 24px);
        max-width: calc(92vw - 24px);
    }
}