/* =======================================================
   HANAFI MAKBUL PORTFOLIO — style.css
   Dark Neon Design System
   ======================================================= */

/* ---- Design Tokens ---- */
:root {
    --bg: #050505;
    --surface: #0a0a0a;
    --surface2: #0f1621;
    --border: rgba(255, 255, 255, .10);
    --muted: rgba(234, 240, 255, .65);
    --text: #EAF0FF;
    --cyan: #00f3ff;
    --purple: #bc13fe;
    --radius: 16px;

    --cyan-glow: 0 0 10px rgba(0, 243, 255, .35), 0 0 30px rgba(0, 243, 255, .15);
    --purple-glow: 0 0 10px rgba(188, 19, 254, .35), 0 0 30px rgba(188, 19, 254, .15);
    --nav-h: 70px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 16px;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: var(--text);
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
}

h3 {
    font-size: 1.2rem;
}

p {
    color: var(--muted);
}

section {
    padding: 5rem 0;
}

/* ---- Layout ---- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---- Gradient Text ---- */
.text-gradient {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-cyan {
    color: var(--cyan);
}

.text-purple {
    color: var(--purple);
}

/* ========== GLASS CARD ========== */
.glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.glass:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 243, 255, .25);
    box-shadow: var(--cyan-glow);
}

.glow-cyan {
    box-shadow: var(--cyan-glow);
}

.glow-purple {
    box-shadow: var(--purple-glow);
}

/* Gradient border pseudo */
.card-gradient-border {
    position: relative;
}

.card-gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition);
}

.card-gradient-border:hover::before {
    opacity: 1;
}

/* ---- Gradient divider ---- */
.gradient-divider {
    height: 1px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    margin: 2rem 0;
    border: none;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), #00b4cc);
    color: var(--bg);
    box-shadow: 0 4px 20px rgba(0, 243, 255, .35);
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(0, 243, 255, .55);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 243, 255, .15);
}

.btn-purple {
    background: linear-gradient(135deg, var(--purple), #9a0dd7);
    color: #fff;
    box-shadow: var(--purple-glow);
    width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.btn-purple:hover {
    box-shadow: 0 0 40px rgba(188, 19, 254, .65);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

/* ========== NAVBAR ========== */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-h);
    background: rgba(5, 5, 5, .88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    flex-shrink: 0;
}

.logo .material-symbols-outlined {
    color: var(--cyan);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px var(--cyan));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.nav-item {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    transition: color var(--transition);
    position: relative;
}

.nav-item:hover {
    color: var(--text);
}

.nav-item.active {
    color: var(--cyan);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--cyan);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--cyan);
}

.btn-resume {
    margin-left: 1rem;
    padding: 0.45rem 1.2rem;
    border: 1px solid var(--cyan);
    border-radius: 8px;
    color: var(--cyan);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-resume:hover {
    background: var(--cyan);
    color: var(--bg);
    box-shadow: 0 0 15px rgba(0, 243, 255, .4);
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    margin-left: auto;
}

.menu-toggle .material-symbols-outlined {
    font-size: 1.8rem;
}

/* ========== BADGE / TAG ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-cyan {
    background: rgba(0, 243, 255, .1);
    color: var(--cyan);
    border: 1px solid rgba(0, 243, 255, .25);
}

.badge-purple {
    background: rgba(188, 19, 254, .1);
    color: var(--purple);
    border: 1px solid rgba(188, 19, 254, .25);
}

.badge-date {
    background: rgba(0, 243, 255, .08);
    color: var(--cyan);
    border: 1px solid rgba(0, 243, 255, .2);
    font-size: 0.8rem;
    font-weight: 500;
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--muted);
    transition: all var(--transition);
}

.tag:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

/* ========== HERO ========== */
.hero-section {
    display: grid;
    grid-template-columns: 1fr .8fr;
    align-items: center;
    gap: 4rem;
    min-height: calc(100vh - var(--nav-h));
    padding: 4rem 0;
}

.hero-text h1 {
    margin-bottom: 1.5rem;
}

.hero-text p {
    max-width: 480px;
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-avatar-wrap {
    position: relative;
}

.hero-avatar-frame {
    padding: .75rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
    box-shadow: var(--cyan-glow);
    transform: rotate(2deg);
    transition: transform var(--transition);
    position: relative;
    overflow: hidden;
}

.hero-avatar-frame:hover {
    transform: rotate(0) scale(1.01);
}

.hero-avatar-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: 14px;
    filter: grayscale(20%);
    cursor: pointer;
    transition: filter var(--transition);
}

.hero-avatar-img:hover {
    filter: grayscale(0);
}

.hero-status-badge {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    background: rgba(5, 5, 5, .75);
    backdrop-filter: blur(12px);
    padding: .7rem 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.hero-status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* Caps */
.caps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.cap-card {
    padding: 1.5rem;
}

.cap-card .material-symbols-outlined {
    font-size: 2rem;
    margin-bottom: .75rem;
    display: block;
}

/* ========== PROJECT CARDS ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.projects-all-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.project-card,
.cap-card {
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

.project-card:hover,
.cap-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 243, 255, .3);
    box-shadow: 0 10px 40px rgba(0, 243, 255, .1);
}

.project-card.hidden {
    display: none;
}

.project-thumb {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--surface2);
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    opacity: .75;
}

.project-card:hover .project-thumb img {
    transform: scale(1.05);
}

.project-label {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(8px);
    color: var(--cyan);
    border: 1px solid rgba(0, 243, 255, .3);
    padding: .2rem .6rem;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
}

.project-body {
    padding: 1.25rem;
}

.project-body h3 {
    font-size: 1.05rem;
    margin-bottom: .4rem;
}

.proje.cert-desc {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    line-height: 1.5;
    height: 4.5em;
    /* Fallback fixed height (3 lines * 1.5 line-height) */
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

/* ========== FILTER TABS ========== */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 3rem;
}

.filter-tab,
.vol-filter-tab,
.cert-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1.2rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-tab:hover,
.vol-filter-tab:hover,
.cert-filter-tab:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.filter-tab.active,
.vol-filter-tab.active,
.cert-filter-tab.active {
    background: rgba(0, 243, 255, .1);
    border-color: var(--cyan);
    color: var(--cyan);
}

.experience-thumb:hover img {
    transform: scale(1.05);
}

.filter-tab .material-symbols-outlined,
.vol-filter-tab .material-symbols-outlined {
    font-size: 1rem;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    margin-top: 3rem;
}

.pag-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.pag-btn:hover:not(.disabled):not(:disabled) {
    border-color: var(--cyan);
    color: var(--cyan);
}

.pag-btn.active {
    background: rgba(0, 243, 255, .1);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 243, 255, .2);
}

.pag-btn.disabled {
    opacity: .35;
    cursor: not-allowed;
}

.pag-btn .material-symbols-outlined {
    font-size: 1.1rem;
}

/* ========== ABOUT ========== */
.about-layout {
    display: grid;
    grid-template-columns: 1fr .7fr;
    gap: 5rem;
    align-items: center;
}

.about-text blockquote {
    border-left: 3px solid var(--cyan);
    padding: .5rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--muted);
    font-style: italic;
}

.about-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.about-img {
    position: relative;
}

.about-img-inner {
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(0, 243, 255, .2);
    box-shadow: var(--cyan-glow);
}

.about-img-inner img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    filter: grayscale(20%);
}

.about-status {
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.stack-section {
    margin-top: 4rem;
}

.stack-title {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stack-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}

.stack-tile {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1.1rem;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.stack-tile:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 243, 255, .12);
}

.stack-tile .material-symbols-outlined {
    font-size: 1.3rem;
    color: var(--cyan);
    flex-shrink: 0;
}

/* ========== INTERNSHIP / TIMELINE ========== */
.page-intro {
    max-width: 600px;
    margin-bottom: 4rem;
}

.page-intro h1 {
    margin-bottom: .75rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--cyan), var(--purple), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-dot {
    position: absolute;
    left: -2.55rem;
    top: 1.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(0, 243, 255, .4);
}

.timeline-dot .material-symbols-outlined {
    font-size: .95rem;
    color: var(--cyan);
}

.timeline-card {
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all var(--transition);
}

.timeline-card:hover {
    border-color: rgba(0, 243, 255, .2);
    box-shadow: 0 4px 30px rgba(0, 243, 255, .08);
}

.timeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: .25rem;
}

.timeline-card-header h3 {
    font-size: 1.15rem;
}

.timeline-company {
    font-size: .88rem;
    color: var(--cyan);
    margin-bottom: 1.25rem;
}

.timeline-achievements {
    list-style: none;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.timeline-achievements li {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    font-size: .9rem;
    color: var(--muted);
}

.timeline-achievements li::before {
    content: '⚡';
    flex-shrink: 0;
    font-size: .85rem;
    margin-top: .1rem;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.cta-card {
    text-align: center;
    margin-top: 3rem;
    padding: 3rem;
}

/* ========== VOLUNTEER (PROJECT-STYLE) ========== */
.vol-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.vol-card {
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.vol-card.vol-show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .4s ease, transform .4s ease, border-color var(--transition), box-shadow var(--transition);
}

.vol-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 243, 255, .3);
    box-shadow: 0 10px 40px rgba(0, 243, 255, .1);
}

.vol-card-thumb {
    height: 180px;
    overflow: hidden;
    background: var(--surface2);
}

.vol-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .7;
    transition: transform .5s ease;
}

.vol-card:hover .vol-card-thumb img {
    transform: scale(1.05);
}

.vol-card-body {
    padding: 1.25rem;
}

.vol-card-body h3 {
    font-size: 1rem;
    margin-bottom: .3rem;
}

.vol-card-body .vol-meta {
    font-size: .82rem;
    color: var(--cyan);
    margin-bottom: .5rem;
}

.vol-card-body p {
    font-size: .85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.vol-card-body .btn {
    font-size: .82rem;
    padding: .4rem 1rem;
}

/* ========== PREMIUM CONTACT REDESIGN (FINAL) ========== */
.contact-grid-premium {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: start;
    padding-top: 1rem;
}

.contact-hero {
    display: flex;
    flex-direction: column;
}

.contact-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.contact-hero p {
    font-size: 1.05rem;
    color: var(--muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* Unified Layout for Cards */
.info-cards-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* The Core Info-Card (Premium) */
.info-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    color: inherit !important;
    cursor: default;
}

/* Clickable Link Variant */
.info-card.clickable {
    cursor: pointer;
}

.info-card.clickable:hover {
    border-color: var(--cyan);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.12);
}

/* Icon Management */
.info-card .card-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.info-card.clickable:hover .card-icon {
    background: var(--cyan);
    color: var(--bg);
}

/* Text Content within Card */
.info-card .card-body {
    flex-grow: 1;
}

.info-card .card-label {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.info-card .card-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

/* Right-side Arrow/Button (Optional) */
.info-card .card-chevron {
    margin-left: auto;
    font-size: 1.1rem;
    color: var(--muted);
    opacity: 0.4;
    transition: all 0.3s ease;
}

.info-card.clickable:hover .card-chevron {
    color: var(--cyan);
    opacity: 1;
    transform: translateX(4px);
}

/* Email Specific Styling */
.email-btn-text {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--cyan);
    margin-left: auto;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.info-card.clickable:hover .email-btn-text {
    opacity: 1;
}

/* Responsiveness */
@media(max-width:1024px) {
    .contact-grid-premium {
        gap: 3rem;
    }
}

@media(max-width:860px) {
    .contact-grid-premium {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-hero {
        align-items: center;
        text-align: center;
    }

    .contact-hero h1 {
        text-align: center;
    }
}

@media(max-width:480px) {
    .info-card {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }

    .info-card .card-icon {
        width: 40px;
        height: 40px;
    }

    .info-card .card-value {
        font-size: 0.95rem;
    }
}

/* ========== MODAL ========== */
#modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

#modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(.95);
    transition: transform .3s ease;
}

#modal-overlay.open .modal-box {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.4rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    cursor: pointer;
}

.modal-close:hover {
    background: rgba(255, 255, 255, .15);
    border-color: var(--cyan);
    color: var(--cyan);
}

/* Lightbox */
.lightbox-content {
    text-align: center;
    padding: 2rem;
}

.lightbox-img {
    max-height: 75vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: 12px;
    margin: 0 auto;
}

.lightbox-caption {
    margin-top: 1rem;
    font-size: .9rem;
    color: var(--muted);
}

/* ---- Project Modal ---- */
.project-modal-inner {
    display: flex;
    flex-direction: column;
}

.project-modal-body {
    padding: 1.5rem 2rem 2rem;
}

.project-modal-body h2 {
    font-size: 1.6rem;
    margin-bottom: .75rem;
    color: var(--text);
}

.project-modal-body p {
    font-size: .95rem;
    line-height: 1.7;
}

/* ---- Volunteer Modal ---- */
.vol-modal-inner {
    display: flex;
    flex-direction: column;
}

.vol-modal-img-wrap {
    height: 300px;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.vol-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vol-modal-body {
    padding: 1.5rem 2rem 2rem;
}

.vol-modal-body h2 {
    font-size: 1.6rem;
    margin-bottom: .5rem;
    color: var(--text);
}

.vol-modal-body p {
    font-size: .92rem;
    line-height: 1.7;
}

/* ---- Slider ---- */
.slider-wrap {
    position: relative;
    background: var(--surface2);
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
}

.slider-main-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .6);
    border: 1px solid var(--border);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    z-index: 5;
}

.slider-arrow:hover {
    background: rgba(0, 243, 255, .2);
    border-color: var(--cyan);
}

.slider-prev {
    left: 1rem;
}

.slider-next {
    right: 1rem;
}

.slider-bottom {
    position: absolute;
    bottom: .75rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .75rem;
}

.slider-dots {
    display: flex;
    gap: .4rem;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .3);
    cursor: pointer;
    transition: all var(--transition);
}

.slider-dot.active {
    background: var(--cyan);
    box-shadow: 0 0 6px var(--cyan);
    width: 22px;
    border-radius: 4px;
}

.slider-counter {
    font-size: .75rem;
    color: var(--muted);
    background: rgba(0, 0, 0, .5);
    padding: .15rem .5rem;
    border-radius: 4px;
}

/* ========== FOOTER ========== */
footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    margin-top: 5rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    font-size: .88rem;
    color: var(--muted);
}

.footer-socials {
    display: flex;
    gap: 1rem;
}

.footer-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: all var(--transition);
}

.footer-social-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, .2);
}

.footer-social-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== ORBS ========== */
.orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(100px);
    opacity: .06;
}

.orb-cyan {
    width: 400px;
    height: 400px;
    background: var(--cyan);
    top: -100px;
    right: -100px;
}

.orb-purple {
    width: 350px;
    height: 350px;
    background: var(--purple);
    bottom: 100px;
    left: -100px;
}

/* ========== CV PAGE ========== */
.cv-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    gap: 1.5rem;
}

.cv-page .material-symbols-outlined {
    font-size: 3rem;
    color: var(--cyan);
    animation: pulse 2s infinite;
}

.cv-page h2 {
    font-size: 1.5rem;
}

.cv-page p {
    font-size: .95rem;
}

/* ========== RESPONSIVE ========== */

@media(max-width:1024px) {
    .contact-premium-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media(max-width:768px) {
    .container {
        padding: 0 1.25rem;
    }

    section {
        padding: 3.5rem 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: rgba(5, 5, 5, .97);
        padding: 1.5rem;
        gap: .5rem;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open {
        display: flex;
    }

    .btn-resume:not(.mobile-resume) {
        display: none;
    }

    .btn-resume.mobile-resume {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-section {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        min-height: auto;
        padding: 2.5rem 0;
    }

    .hero-avatar-frame {
        transform: rotate(0);
    }

    .hero-avatar-img {
        height: 350px;
    }

    .caps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid,
    .projects-all-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-img-inner img {
        height: 350px;
    }

    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .vol-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .slider-main-img {
        height: 260px;
    }

    .vol-modal-img-wrap {
        height: 200px;
    }

    .social-premium-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width:480px) {
    .caps-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid,
    .projects-all-grid {
        grid-template-columns: 1fr;
    }

    .stack-grid {
        grid-template-columns: 1fr;
    }

    .vol-grid {
        grid-template-columns: 1fr;
    }

    .hero-btns,
    .about-btns {
        flex-direction: column;
    }

    .cap-card,
    .glass,
    .email-primary-card,
    .connect-panel-premium {
        padding: 1.25rem;
    }

    h1 {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
    }

    .slider-main-img {
        height: auto;
        max-height: 50vh;
    }

    .email-primary-actions {
        flex-direction: column;
    }

    .social-premium-grid {
        grid-template-columns: 1fr;
    }
}

/* Standardized Thumbnails */
.project-thumb {
    height: 200px;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: 8px 8px 0 0;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s var(--transition);
}

.thumb--contain img {
    object-fit: contain;
    padding: 1rem;
}

/* Modal Slider & Zoom Enhancements */
.project-modal-inner .slider-wrap {
    background: #000;
    max-height: 75vh;
    overflow: auto;
    /* Allow scroll for both axis when zoomed or long portrait */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.project-modal-inner .slider-main-img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease;
    display: block;
}

.project-modal-inner .slider-main-img.zoomed {
    transform: scale(1.5);
    cursor: zoom-out;
    max-height: none;
    /* Allow full height when zoomed for scrolling */
    z-index: 10;
}

@media (max-width: 768px) {
    .project-thumb {
        height: 180px;
    }

    .project-modal-inner {
        padding: 0;
    }

    .project-modal-inner .slider-wrap {
        border-radius: 0;
    }

    .project-modal-inner .slider-main-img {
        border-radius: 0;
        max-height: 60vh;
    }
}

/* ========== STANDARDIZED CERTIFICATE CARDS ========== */
.cert-card {
    display: flex !important;
    flex-direction: column !important;
    height: 380px !important;
    background: rgba(255, 255, 255, .04) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    overflow: hidden !important;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    cursor: pointer;
    position: relative;
}

.cert-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 243, 255, .3) !important;
    box-shadow: 0 10px 40px rgba(0, 243, 255, .1) !important;
}

.cert-thumb {
    height: 180px !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    background: var(--surface2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cert-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 0.8 !important;
}

.cert-card:hover .cert-thumb img {
    opacity: 1 !important;
    transform: scale(1.05);
}

.cert-body {
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    overflow: hidden !important;
}

.cert-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
    color: var(--text) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.3 !important;
    max-height: 2.6em !important;
}

.cert-desc {
    font-size: 0.88rem !important;
    color: var(--muted) !important;
    margin-bottom: 1rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.5 !important;
    max-height: 4.5em !important;
    flex: 1 !important;
}

.cert-meta {
    margin-top: auto !important;
}

.cert-thumb.thumb--contain img {
    object-fit: contain !important;
    padding: 0.75rem !important;
}

/* ========== MEDIA FRAME & ASPECT RATIO HANDLING ========== */
.media-frame {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.media-frame img.is-portrait {
    object-fit: contain !important;
    padding: 12px;
}

/* Volunteer Specific Grid Image Height */
.vol-card-thumb {
    height: 190px;
    background: #000;
}

/* Modal Slider Aspect Ratio Fix */
.slider-main-img.is-portrait {
    object-fit: contain !important;
    padding: 20px;
    max-height: 75vh;
}