:root {
    --gold: #d4af37;
    --gold-light: #f0d060;
    --blood: #8b1a1a;
    --blood-glow: #cc3333;
    --mystic: #6a3d8f;
    --mystic-light: #9b6fc0;
    --ember: #e85d26;
    --dark-bg: #0a0908;
    --darker-bg: #050504;
    --card-bg: rgba(12, 10, 8, 0.85);
    --text-primary: #d4cfc4;
    --text-secondary: #8a8070;
    --border-subtle: rgba(212, 175, 55, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Crimson Text', serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: default;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(106, 61, 143, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 26, 26, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(212, 175, 55, 0.03) 0%, transparent 60%);
    z-index: -3;
    pointer-events: none;
}

.fog-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 10% 90%, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 10%, rgba(106, 61, 143, 0.04) 0%, transparent 50%);
    animation: fogDrift 30s linear infinite;
    z-index: -2;
    pointer-events: none;
}

@keyframes fogDrift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(5, 5, 4, 0.7) 100%);
    z-index: -1;
    pointer-events: none;
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--gold);
    border-radius: 50%;
    animation: emberFloat 15s infinite;
    opacity: 0;
    box-shadow: 0 0 6px var(--gold), 0 0 12px rgba(212, 175, 55, 0.3);
}

@keyframes emberFloat {
    0%, 100% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    5% { opacity: 0.8; }
    50% { opacity: 0.4; }
    95% { opacity: 0; }
    100% { transform: translateY(-10vh) rotate(360deg) translateX(30px); opacity: 0; }
}

/* ========== NAVIGATION ========== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(to bottom, var(--darker-bg), transparent);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.4rem;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.logo-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gold);
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.logo-sep {
    color: var(--text-secondary);
    opacity: 0.4;
}

.logo-title {
    font-family: 'MedievalSharp', cursive;
    font-size: 0.95rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.4s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--gold);
    box-shadow: 0 0 6px var(--gold);
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: var(--gold);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--gold);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.nav-links a.active::after {
    width: 100%;
}

/* ========== HERO ========== */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
}

.hero-content {
    text-align: center;
    max-width: 900px;
}

.terminal-line {
    font-family: 'MedievalSharp', cursive;
    font-size: 1rem;
    color: var(--mystic-light);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(155, 111, 192, 0.4);
}

.hero h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 900;
    letter-spacing: 0.8rem;
    margin-bottom: 1rem;
    color: var(--gold);
    text-shadow: 
        0 0 20px rgba(212, 175, 55, 0.4),
        0 0 60px rgba(212, 175, 55, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.8);
    animation: titleReveal 1.2s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

@keyframes titleReveal {
    0% {
        opacity: 0;
        transform: translateY(30px);
        letter-spacing: 2rem;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: 0.8rem;
    }
}

.hero-subtitle {
    font-family: 'Cinzel', serif;
    font-size: clamp(1rem, 3vw, 1.4rem);
    color: var(--text-secondary);
    letter-spacing: 0.6rem;
    text-transform: uppercase;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero-description {
    font-family: 'Crimson Text', serif;
    font-size: 1.15rem;
    line-height: 2;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

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

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.9s;
}

.btn {
    padding: 1rem 2.5rem;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.15), inset 0 0 15px rgba(212, 175, 55, 0.05);
}

.btn-primary:hover {
    background: var(--gold);
    color: var(--dark-bg);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--blood-glow);
    border: 1px solid var(--blood);
    box-shadow: 0 0 15px rgba(139, 26, 26, 0.15), inset 0 0 15px rgba(139, 26, 26, 0.05);
}

.btn-secondary:hover {
    background: var(--blood);
    color: var(--text-primary);
    box-shadow: 0 0 30px rgba(139, 26, 26, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    letter-spacing: 3px;
    animation: bounce 2.5s infinite;
}

.scroll-indicator .arrow {
    width: 16px;
    height: 16px;
    border-right: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    transform: rotate(45deg);
    opacity: 0.5;
}

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

/* ========== SECTIONS ========== */

section {
    padding: 8rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-header h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    margin-bottom: 1rem;
    letter-spacing: 0.5rem;
}

.section-header h2::before,
.section-header h2::after {
    content: '✦';
    color: var(--gold);
    opacity: 0.4;
    font-size: 0.6em;
    vertical-align: middle;
    margin: 0 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-family: 'MedievalSharp', cursive;
    font-size: 1.05rem;
    letter-spacing: 1px;
    font-style: italic;
}

/* ========== ABOUT ========== */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    padding: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.stat-item::before,
.stat-item::after {
    content: '◆';
    position: absolute;
    color: var(--gold);
    opacity: 0.2;
    font-size: 0.5rem;
}

.stat-item::before {
    top: 8px;
    left: 8px;
}

.stat-item::after {
    bottom: 8px;
    right: 8px;
}

.stat-number {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.stat-label {
    font-family: 'Crimson Text', serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

.about-visual {
    position: relative;
    height: 400px;
}

.code-block {
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(210, 180, 120, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(180, 150, 90, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #2a2015 0%, #1e1810 30%, #231c12 60%, #2a2015 100%);
    border: none;
    padding: 2.5rem 2rem 2rem;
    font-size: 0.85rem;
    overflow: hidden;
    position: relative;
    box-shadow: 
        inset 0 0 60px rgba(0, 0, 0, 0.5),
        inset 0 0 15px rgba(180, 140, 60, 0.06),
        0 4px 20px rgba(0, 0, 0, 0.6);
}

/* Burnt / torn edges */
.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(to right, rgba(10, 9, 8, 0.7) 0%, transparent 4%, transparent 96%, rgba(10, 9, 8, 0.7) 100%),
        linear-gradient(to bottom, rgba(10, 9, 8, 0.5) 0%, transparent 5%, transparent 95%, rgba(10, 9, 8, 0.5) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Decorative header ribbon */
.code-block::after {
    content: '⸻  Parchemin  ⸻';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: 'MedievalSharp', cursive;
    font-size: 0.7rem;
    color: #8a7550;
    letter-spacing: 4px;
    padding: 6px 0;
    background: linear-gradient(90deg, transparent, rgba(180, 140, 60, 0.08), transparent);
    border-bottom: 1px solid rgba(180, 140, 60, 0.1);
    z-index: 2;
}

.code-block pre {
    margin-top: 0.8rem;
    white-space: pre-wrap;
    color: #b8a47c;
    font-family: 'MedievalSharp', cursive;
    font-size: 0.9rem;
    line-height: 1.9;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 8px rgba(180, 140, 60, 0.1);
}

.code-block .keyword { color: #cc6644; }
.code-block .string { color: #9b8ec4; }
.code-block .property { color: #d4af37; text-shadow: 0 0 6px rgba(212, 175, 55, 0.2); }
.code-block .comment { color: #6a5d45; font-style: italic; }

/* ========== TIMELINE ========== */

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), var(--blood), var(--mystic));
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.timeline-item {
    position: relative;
    padding: 2rem;
    margin-bottom: 3rem;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    transition: all 0.4s ease;
}

.timeline-item:hover {
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.1);
    transform: translateX(10px);
}

.timeline-item::before {
    content: '◆';
    position: absolute;
    left: -3rem;
    top: 2.2rem;
    color: var(--gold);
    font-size: 0.8rem;
    text-shadow: 0 0 10px var(--gold);
    transform: translateX(-4px);
}

.timeline-date {
    font-family: 'MedievalSharp', cursive;
    font-size: 0.9rem;
    color: var(--blood-glow);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.timeline-company {
    font-family: 'Crimson Text', serif;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.timeline-description ul {
    list-style: none;
    margin-top: 1rem;
}

.timeline-description li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.timeline-description li::before {
    content: '⬥';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 0.6rem;
    top: 4px;
}

/* ========== SKILLS ========== */

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--blood), var(--mystic));
}

.skill-category::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.skill-category h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.skill-category h3::before {
    content: '◈';
    color: var(--mystic-light);
    font-size: 0.9rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.2);
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    color: var(--gold-light);
    transition: all 0.4s ease;
    cursor: default;
}

.skill-tag:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    transform: scale(1.05);
}

/* ========== PROJECTS ========== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    align-items: start;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    position: relative;
    transition: all 0.4s ease;
    cursor: pointer;
}

.project-card:hover {
    border-color: var(--gold);
    box-shadow: 0 10px 40px rgba(212, 175, 55, 0.1);
}

.project-image {
    height: 200px;
    background: 
        radial-gradient(ellipse at center, rgba(106, 61, 143, 0.15) 0%, transparent 70%),
        linear-gradient(135deg, rgba(139, 26, 26, 0.1), rgba(212, 175, 55, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3rem;
}

.project-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.3;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: var(--gold);
    margin-bottom: 0.7rem;
    letter-spacing: 1px;
}

.project-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tag {
    font-family: 'Crimson Text', serif;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    background: rgba(139, 26, 26, 0.1);
    border: 1px solid rgba(139, 26, 26, 0.3);
    color: var(--blood-glow);
}

.project-toggle {
    font-size: 0.8rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    display: inline-block;
    color: var(--text-secondary);
}

.project-details {
    max-height: 0px;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background: var(--darker-bg);
    border-top: 1px solid var(--border-subtle);
}

.project-details-content {
    padding: 1.5rem;
}

.project-details h4 {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    margin: 1.2rem 0 0.5rem 0;
    letter-spacing: 1px;
}

.project-details h4:first-child {
    margin-top: 0;
}

.project-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.project-details ul {
    list-style: none;
    margin: 0.5rem 0;
}

.project-details li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: 0.3rem;
}

.project-details li::before {
    content: '⬥';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: 0.5rem;
    top: 5px;
}

/* ========== CONTACT FORM ========== */

.contact-form {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    position: relative;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--darker-bg);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    transition: all 0.4s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
    font-style: italic;
}

/* ========== FOOTER ========== */

footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 5rem;
    position: relative;
}

footer::before {
    content: '◆ ◆ ◆';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-bg);
    padding: 0 1rem;
    color: var(--gold);
    opacity: 0.3;
    font-size: 0.6rem;
    letter-spacing: 8px;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

footer .copyright {
    margin-top: 1rem;
    color: var(--gold);
    opacity: 0.6;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

/* ========== LIBRARY (TP / Documents) ========== */

.library-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--darker-bg);
    border: 1px solid var(--border-subtle);
}

.library-title {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.8rem;
}

.library-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 1rem;
    background: rgba(212, 175, 55, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.1);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.library-item:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.library-item.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.library-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.library-name {
    font-family: 'Crimson Text', serif;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.library-note {
    margin-top: 1rem;
    font-family: 'MedievalSharp', cursive;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.7;
}

/* ========== CERTIFICATIONS ========== */

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gold), var(--mystic));
}

.cert-card:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
    transform: translateY(-3px);
}

.cert-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.cert-info {
    flex: 1;
}

.cert-name {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--gold);
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.cert-detail {
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ========== PAGE TRANSITION OVERLAY ========== */

#page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: var(--darker-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#page-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

#page-overlay-text {
    font-family: 'MedievalSharp', cursive;
    font-size: 1.2rem;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    letter-spacing: 3px;
    animation: pulseGlow 1.5s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { text-shadow: 0 0 15px rgba(212, 175, 55, 0.4); }
    50% { text-shadow: 0 0 30px rgba(212, 175, 55, 0.7), 0 0 60px rgba(212, 175, 55, 0.3); }
}

/* ========== PDF VIEWER MODAL ========== */

.pdf-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.pdf-modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.pdf-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90vw;
    height: 85vh;
    max-width: 1000px;
    z-index: 9991;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gold);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.15), 0 20px 60px rgba(0, 0, 0, 0.6);
    background: var(--darker-bg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pdf-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--card-bg);
}

.pdf-modal-title {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--gold);
    letter-spacing: 2px;
}

.pdf-modal-close {
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem 0.8rem;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
}

.pdf-modal-close:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.pdf-modal-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #1a1a1a;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 968px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

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

    section {
        padding: 4rem 1.5rem;
    }

    .hero h1 {
        letter-spacing: 0.3rem;
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* ========== SCROLLBAR ========== */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    opacity: 0.6;
    box-shadow: 0 0 6px var(--gold);
}

::selection {
    background: var(--gold);
    color: var(--dark-bg);
}
