/* =========================================================
   PORTFOLIO — Chinnachot Na Wilaithong
   Dark-Tech Theme · Blue Accent · Full Responsive
   ========================================================= */

/* ---------- CSS VARIABLES ---------- */
:root {
    --bg:          #080c14;
    --bg2:         #0d1220;
    --bg3:         #111827;
    --blue:        #00c8ff;
    --blue-dim:    rgba(0, 200, 255, 0.15);
    --blue-glow:   rgba(0, 200, 255, 0.4);
    --blue-dark:   rgba(0, 200, 255, 0.08);
    --white:       #f0f6ff;
    --muted:       #7b8db0;
    --card-bg:     rgba(13, 18, 32, 0.85);
    --border:      rgba(0, 200, 255, 0.15);
    --font-th:     'Prompt', sans-serif;
    --font-en:     'Space Grotesk', 'Inter', sans-serif;
    --nav-h:       72px;
    --radius:      18px;
    --transition:  0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- BASE RESET ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    background: var(--bg);
    color: var(--white);
    font-family: var(--font-th);
    line-height: 1.7;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
strong { color: var(--white); }
em { color: var(--blue); font-style: normal; }

h1, h2, h3, .logo, .radial-pct { font-family: var(--font-en); }

.hl {
    color: var(--blue);
    text-shadow: 0 0 20px rgba(0,200,255,0.35);
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

.section-pad { padding: 6rem 0; }

/* ---- Section Header ---- */
.section-header { text-align: center; margin-bottom: 4rem; }

.section-tag {
    display: inline-block;
    font-family: var(--font-en);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--blue);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.3rem 1.1rem;
    margin-bottom: 1rem;
    background: var(--blue-dark);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.section-desc {
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1rem;
}

/* =========================================================
   HEADER / NAVBAR
   ========================================================= */
#main-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 1000;
    background: rgba(8, 12, 20, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), box-shadow var(--transition);
}

#main-header.scrolled {
    background: rgba(8, 12, 20, 0.97);
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}
.logo-dot { color: var(--blue); }
.logo-accent { color: var(--blue); font-size: 0.8em; letter-spacing: 3px; }

#main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--muted);
    transition: color var(--transition), background var(--transition);
}

.nav-link i { font-size: 0.8rem; }
.nav-link span { /* text label */ }

.nav-link:hover, .nav-link.active {
    color: var(--blue);
    background: var(--blue-dim);
}

.nav-cta {
    margin-left: 0.5rem;
    background: var(--blue-dim);
    border: 1px solid var(--border);
    color: var(--blue) !important;
    border-radius: 8px;
    transition: all var(--transition);
}

.nav-cta:hover {
    background: var(--blue);
    color: var(--bg) !important;
    box-shadow: 0 0 20px var(--blue-glow);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.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); }

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--nav-h) 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

/* Floating particles container */
#hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-inner {
    max-width: 1140px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    z-index: 1;
    position: relative;
}

/* Hero content */
.hero-content { flex: 1; max-width: 580px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-family: var(--font-en);
    color: var(--blue);
    background: var(--blue-dark);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.35rem 1rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
}

.badge-dot {
    width: 8px; height: 8px;
    background: var(--blue);
    border-radius: 50%;
    animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

.hero-subtitle {
    font-family: var(--font-th);
    font-size: 1.1rem;
    color: var(--muted);
    font-weight: 300;
    margin-bottom: 0.4rem;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
}

.name-th {
    color: var(--white);
    font-family: var(--font-th);
    font-size: 0.65em;
    font-weight: 700;
}

.name-en {
    background: linear-gradient(135deg, var(--blue) 0%, #7b6fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero-tagline {
    font-size: 0.95rem;
    color: var(--blue);
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.hero-desc {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Info grid */
.hero-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--blue-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 0.9rem;
}

.info-item > i {
    font-size: 1rem;
    color: var(--blue);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.info-label {
    display: block;
    font-size: 0.7rem;
    color: var(--muted);
    line-height: 1;
}

.info-value {
    display: block;
    font-size: 0.85rem;
    color: var(--white);
    font-weight: 500;
}

/* Hobbies */
.hero-hobbies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.hobby-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--muted);
    background: var(--bg3);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 50px;
    padding: 0.3rem 0.9rem;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.hobby-tag:hover {
    color: var(--blue);
    border-color: var(--border);
    background: var(--blue-dim);
}

.hobby-tag i { color: var(--blue); font-size: 0.8rem; }

/* CTA buttons */
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.8rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--blue);
    color: var(--bg);
    border-color: var(--blue);
    box-shadow: 0 0 20px rgba(0,200,255,0.35);
}

.btn-primary:hover {
    background: transparent;
    color: var(--blue);
    box-shadow: 0 0 35px var(--blue-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.2);
}

.btn-outline:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-dim);
    transform: translateY(-2px);
}

/* Profile image */
.hero-image-wrap {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-ring {
    position: relative;
    width: 360px;
    height: 360px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img-container {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(0,200,255,0.4);
    box-shadow: 0 0 60px rgba(0,200,255,0.3), inset 0 0 30px rgba(0,200,255,0.1);
    position: relative;
    z-index: 2;
}

.profile-img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.ring-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(0,200,255,0.25);
    animation: orbit-spin 18s linear infinite;
}

.ring-1 { width: 320px; height: 320px; }
.ring-2 { width: 360px; height: 360px; animation-duration: 28s; animation-direction: reverse; border-color: rgba(123, 111, 255, 0.2); }

@keyframes orbit-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.float-badge {
    position: absolute;
    width: 42px; height: 42px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    font-size: 1rem;
    box-shadow: 0 0 15px var(--blue-dim);
    z-index: 3;
    animation: float-anim 3s ease-in-out infinite;
}

.badge-top { top: 0; left: 50%; transform: translateX(-50%); }
.badge-right { right: 0; top: 50%; transform: translateY(-50%); animation-delay: 1s; }
.badge-bottom { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 2s; }

@keyframes float-anim {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}
.badge-right { animation-name: float-anim-right; }
@keyframes float-anim-right {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-50%) translateX(-8px); }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted);
    z-index: 2;
    animation: fade-in-up 1s ease 1.5s both;
}

.scroll-arrow {
    width: 36px; height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    animation: bounce-down 2s ease-in-out infinite;
}

@keyframes bounce-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* =========================================================
   SKILLS SECTION
   ========================================================= */
.skills-section { background: var(--bg); }

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

.skill-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius);
    padding: 2rem 1.2rem 1.5rem;
    text-align: center;
    cursor: default;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0,200,255,0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0,200,255,0.35);
    box-shadow: 0 15px 50px rgba(0,200,255,0.18), 0 0 0 1px rgba(0,200,255,0.08);
}

.skill-card:hover::before { opacity: 1; }

/* Radial progress ring */
.radial-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 1rem;
}

.radial-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.radial-bg {
    fill: none;
    stroke: rgba(255,255,255,0.07);
    stroke-width: 7;
}

.radial-progress {
    fill: none;
    stroke: var(--blue);
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 264; /* 2*π*42 */
    stroke-dashoffset: 264;
    transition: stroke-dashoffset 1.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 4px rgba(0,200,255,0.6));
}

.radial-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radial-pct {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
}

.skill-icon-wrap {
    width: 40px; height: 40px;
    margin: 0 auto 0.7rem;
    background: var(--blue-dim);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    font-size: 1.1rem;
}

.skill-card h3 {
    font-family: var(--font-th);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--white);
}

.skill-card p {
    font-size: 0.72rem;
    color: var(--muted);
    font-family: var(--font-en);
    letter-spacing: 0.5px;
}

/* =========================================================
   EDUCATION TIMELINE
   ========================================================= */
.education-section { background: var(--bg2); }

.timeline-wrap {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--blue) 15%, var(--blue) 85%, transparent);
    transform: translateX(-50%);
    opacity: 0.4;
}

.tl-item {
    display: flex;
    width: 50%;
    padding-bottom: 3rem;
    position: relative;
}

.tl-item.tl-left {
    padding-right: 3.5rem;
    justify-content: flex-end;
}

.tl-item.tl-right {
    padding-left: 3.5rem;
    margin-left: 50%;
}

/* Timeline dot */
.tl-dot-wrap {
    position: absolute;
    top: 0;
}

.tl-left .tl-dot-wrap { right: -20px; }
.tl-right .tl-dot-wrap { left: -20px; }

.tl-dot {
    width: 40px; height: 40px;
    background: var(--bg2);
    border: 2px solid var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    font-size: 0.85rem;
    box-shadow: 0 0 15px rgba(0,200,255,0.35);
    z-index: 2;
    position: relative;
}

.tl-dot-current {
    background: var(--blue);
    color: var(--bg);
    box-shadow: 0 0 25px rgba(0,200,255,0.6);
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0,200,255,0.5); }
    50% { box-shadow: 0 0 40px rgba(0,200,255,0.9); }
}

/* Timeline card */
.tl-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 380px;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    backdrop-filter: blur(10px);
}

.tl-card:hover {
    transform: translateY(-6px);
    border-color: var(--border);
    box-shadow: 0 10px 40px rgba(0,200,255,0.15);
}

.tl-card-current {
    border-color: rgba(0,200,255,0.3);
    box-shadow: 0 0 30px rgba(0,200,255,0.1);
}

.tl-img-wrap { height: 160px; overflow: hidden; }
.tl-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.tl-card:hover .tl-img-wrap img { transform: scale(1.06); }

.tl-body { padding: 1.2rem 1.3rem 1.5rem; }

.tl-level {
    display: inline-block;
    font-size: 0.7rem;
    font-family: var(--font-en);
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.2rem 0.7rem;
    border-radius: 50px;
    margin-bottom: 0.6rem;
}

.lv-primary   { background: rgba(255,200,50,0.1); color: #ffc832; border: 1px solid rgba(255,200,50,0.25); }
.lv-secondary { background: rgba(120,200,100,0.1); color: #78c864; border: 1px solid rgba(120,200,100,0.25); }
.lv-vocational { background: rgba(200,100,255,0.1); color: #c864ff; border: 1px solid rgba(200,100,255,0.25); }
.lv-current   { background: var(--blue-dim); color: var(--blue); border: 1px solid var(--border); display: flex; align-items: center; gap: 0.4rem; }

.tl-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.tl-body p { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.8rem; }

.tl-gpax {
    font-size: 0.82rem;
    color: var(--blue);
    font-family: var(--font-en);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Entry animations for timeline */
.tl-item { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.tl-item.visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   CERTIFICATES SECTION
   ========================================================= */
.cert-section { background: var(--bg); }

.cert-showcase { display: flex; justify-content: center; }

.cert-card {
    display: flex;
    max-width: 860px;
    width: 100%;
    background: var(--card-bg);
    border: 1px solid rgba(0,200,255,0.25);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 60px rgba(0,200,255,0.12);
    transition: transform var(--transition), box-shadow var(--transition);
}

.cert-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 80px rgba(0,200,255,0.25);
}

.cert-glow-ring {
    position: absolute;
    inset: -1px;
    border-radius: 24px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(0,200,255,0.5), transparent 50%, rgba(123,111,255,0.3)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
}

.cert-img-wrap {
    width: 45%;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.cert-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cert-card:hover .cert-img-wrap img { transform: scale(1.04); }

.cert-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8,12,20,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.cert-card:hover .cert-img-overlay { opacity: 1; }

.cert-zoom-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--blue);
    color: var(--bg);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-th);
    transition: transform var(--transition), box-shadow var(--transition);
}

.cert-zoom-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--blue-glow);
}

.cert-info {
    padding: 2.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cert-badge-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--blue), #7b6fff);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 25px rgba(0,200,255,0.4);
}

.cert-year {
    font-size: 0.78rem;
    font-family: var(--font-en);
    color: var(--blue);
    letter-spacing: 2px;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.cert-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.cert-info p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.cert-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.cert-tags span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--blue);
    background: var(--blue-dim);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.25rem 0.8rem;
}

/* =========================================================
   EXPERIENCE SECTION
   ========================================================= */
.exp-section { background: var(--bg2); }

/* Desktop Tabs */
.exp-tabs {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.exp-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--muted);
    padding: 0.7rem 1.4rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-th);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.exp-tab:hover {
    border-color: var(--border);
    color: var(--blue);
    background: var(--blue-dark);
}

.exp-tab.active {
    background: var(--blue-dim);
    border-color: var(--blue);
    color: var(--blue);
    box-shadow: 0 0 20px rgba(0,200,255,0.2);
}

/* Panels */
.exp-panel {
    display: none;
    animation: fade-in 0.4s ease;
}

.exp-panel.active { display: block; }

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.exp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.exp-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.exp-item {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.exp-item:hover {
    transform: translateY(-8px);
    border-color: var(--border);
    box-shadow: 0 15px 50px rgba(0,200,255,0.2);
}

.exp-img-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.exp-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.exp-item:hover .exp-img-wrap img { transform: scale(1.08); }

.exp-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8,12,20,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--blue);
    font-size: 1.8rem;
    opacity: 0;
    transition: opacity var(--transition);
}

.exp-hover-overlay span { font-size: 0.8rem; font-family: var(--font-th); color: var(--white); }
.exp-item:hover .exp-hover-overlay { opacity: 1; }

.exp-label {
    padding: 1rem 1.2rem 1.2rem;
}

.exp-label h4 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--blue);
}

.exp-label p {
    font-size: 0.78rem;
    color: var(--muted);
    font-family: var(--font-en);
    letter-spacing: 0.3px;
}

/* Mobile Carousel */
.exp-mobile-carousel { display: none; }

.carousel-track {
    display: flex;
    overflow: hidden;
    border-radius: var(--radius);
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    transition: transform 0.4s ease;
}

.carousel-slide img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
}

.carousel-caption {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 1rem 1.2rem;
}

.carousel-caption h4 {
    font-size: 1rem;
    color: var(--blue);
    margin-bottom: 0.2rem;
}

.carousel-caption p { font-size: 0.8rem; color: var(--muted); font-family: var(--font-en); }

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.2rem;
}

.carousel-btn {
    width: 40px; height: 40px;
    background: var(--blue-dim);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--blue);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--blue);
    color: var(--bg);
    box-shadow: 0 0 15px var(--blue-glow);
}

.carousel-dots { display: flex; gap: 0.5rem; }

.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.dot.active {
    background: var(--blue);
    transform: scale(1.3);
}

/* =========================================================
   CONTACT SECTION
   ========================================================= */
.contact-section { background: var(--bg); }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: var(--border);
    box-shadow: 0 12px 40px rgba(0,200,255,0.18);
}

.contact-icon-wrap {
    width: 56px; height: 56px;
    background: var(--blue-dim);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.3rem;
    color: var(--blue);
    transition: background var(--transition), box-shadow var(--transition);
}

.contact-card:hover .contact-icon-wrap {
    background: var(--blue);
    color: var(--bg);
    box-shadow: 0 0 25px var(--blue-glow);
}

.contact-card h4 {
    font-size: 0.8rem;
    font-family: var(--font-en);
    color: var(--muted);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.contact-card a {
    font-size: 0.95rem;
    color: var(--white);
    font-weight: 500;
    transition: color var(--transition);
}

.contact-card a:hover { color: var(--blue); }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    background: var(--bg2);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }

.footer-logo {
    font-family: var(--font-en);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.footer-logo span { color: var(--blue); }

footer p { font-size: 0.85rem; color: var(--muted); }
.footer-sub { font-size: 0.78rem; color: rgba(123,141,176,0.6); }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 15, 0.95);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-close:hover {
    background: var(--blue);
    color: var(--bg);
    border-color: var(--blue);
}

.lightbox-content {
    max-width: 860px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.open .lightbox-content { transform: scale(1); }

#lightbox-img {
    max-height: 65vh;
    border-radius: 16px;
    object-fit: contain;
    box-shadow: 0 0 80px rgba(0,200,255,0.2);
}

.lightbox-info { text-align: center; max-width: 680px; }

#lightbox-title {
    font-size: 1.2rem;
    color: var(--blue);
    margin-bottom: 0.5rem;
}

#lightbox-desc {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.8;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */
.back-to-top {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 46px; height: 46px;
    background: var(--blue);
    color: var(--bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    box-shadow: 0 0 20px var(--blue-glow);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition);
}

.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px) scale(1.1); }

/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */
@media (max-width: 1024px) {
    .skills-grid { grid-template-columns: repeat(4, 1fr); }
    .exp-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-inner { flex-direction: column-reverse; text-align: center; gap: 2rem; }
    .hero-content { max-width: 100%; }
    .hero-info-grid { grid-template-columns: 1fr 1fr; }
    .hero-actions { justify-content: center; }
    .hero-hobbies { justify-content: center; }

    .tl-item, .tl-item.tl-right { margin-left: 0; width: 100%; padding-left: 3.5rem; padding-right: 1rem; justify-content: flex-start; }
    .timeline-line { left: 20px; }
    .tl-dot-wrap, .tl-left .tl-dot-wrap, .tl-right .tl-dot-wrap { left: 0; right: auto; }
    .tl-card { max-width: 100%; }

    .cert-card { flex-direction: column; }
    .cert-img-wrap { width: 100%; height: 280px; }

    .exp-grid { grid-template-columns: 1fr; }
    .exp-grid-3 { grid-template-columns: 1fr; }
}

/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */
@media (max-width: 768px) {
    .nav-container { position: relative; }

    .hamburger { display: flex; }

    #main-nav {
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0;
        background: rgba(8,12,20,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.5rem 2rem;
        gap: 0.25rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s ease, opacity 0.35s ease;
    }

    #main-nav.nav-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-link { padding: 0.8rem 1rem; border-radius: 10px; font-size: 1rem; }
    .nav-cta { margin-left: 0; text-align: center; justify-content: center; margin-top: 0.5rem; }

    .profile-ring { width: 260px; height: 260px; }
    .profile-img-container { width: 200px; height: 200px; }
    .ring-1 { width: 230px; height: 230px; }
    .ring-2 { width: 260px; height: 260px; }

    .hero-info-grid { grid-template-columns: 1fr; }

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

    /* Hide desktop layout, show carousel */
    .exp-desktop-layout { display: none; }
    .exp-mobile-carousel { display: block; }

    .contact-grid { grid-template-columns: 1fr; max-width: 400px; }

    .cert-info { padding: 1.5rem; }
    .cert-info h3 { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 2rem; }
    .btn { font-size: 0.85rem; padding: 0.65rem 1.3rem; }
}
