/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', 'Poppins', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(var(--primary-rgb), 0.08), transparent 30%),
        radial-gradient(circle at 80% 0%, rgba(var(--accent-rgb), 0.08), transparent 25%),
        linear-gradient(135deg, rgba(228, 222, 213, 0.5), rgba(255, 255, 255, 0.6));
    transition: background-color 0.3s ease, color 0.3s ease, background-image 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 22px;
}

section {
    padding: clamp(64px, 9vw, 120px) 0;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 18px;
    font-family: 'Playfair Display', 'Poppins', serif;
    font-weight: 700;
    color: var(--secondary-color);
    letter-spacing: -0.02em;
}

h2 {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 6px;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 68px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0.8;
}

p {
    margin-bottom: 14px;
    color: var(--text-light);
}

.section-subtitle {
    color: var(--text-light);
    max-width: 720px;
    margin-top: -4px;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav {
    padding: 18px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.nav-logo h1 {
    font-size: 1.6rem;
    font-family: 'Dancing Script', 'Playfair Display', cursive;
    letter-spacing: 0.01em;
    background: linear-gradient(120deg, #c05c43, #f4c361, #8ac0a3, #c05c43);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.signature-text {
    font-family: 'Dancing Script', 'Playfair Display', cursive;
    display: inline-block;
    white-space: nowrap;
    text-transform: capitalize;
    background: linear-gradient(120deg, #c05c43, #f4c361, #8ac0a3, #c05c43);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.dark-mode .nav-logo h1,
.dark-mode .signature-text {
    text-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    position: relative;
    padding: 6px 0;
    transition: color 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a:hover::after {
    transform: scaleX(1);
}

.nav-actions {
    display: flex;
    align-items: center;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(var(--primary-rgb), 0.3);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    position: relative;
    width: 28px;
    height: 22px;
}

.bar {
    width: 26px;
    height: 3px;
    background-color: var(--secondary-color);
    transition: 0.3s ease;
    border-radius: 999px;
}

.dark-mode .bar {
    background-color: #e5e7eb;
}

/* Hero Section */
.hero {
    padding: 160px 0 120px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, rgba(255, 255, 255, 0.7) 30%, rgba(var(--accent-rgb), 0.08) 100%);
}

.hero-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 22px;
}

.hero-content h2 {
    font-size: clamp(2.6rem, 4vw, 3.6rem);
    margin-bottom: 12px;
}

.hero-kicker {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 14px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.75;
}

.type-target {
    position: relative;
    display: inline-block;
    min-height: 1.2em;
}

.typewriter-active::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 0;
    width: 2px;
    height: 1.1em;
    background: var(--primary-color);
    animation: caretBlink 0.9s step-end infinite;
}

.hero-highlight {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    background: linear-gradient(120deg, rgba(var(--primary-rgb), 0.12), rgba(var(--accent-rgb), 0.22));
    color: var(--secondary-color);
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(var(--primary-rgb), 0.18);
    border: 1px solid rgba(var(--primary-rgb), 0.22);
    margin-bottom: 20px;
}

.hero-highlight::before {
    /* content: '•'; */
    font-size: 1.4rem;
    color: var(--primary-color);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.06);
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.cta-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    text-decoration: none;
    border-radius: 16px;
    font-weight: 700;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.15);
    border: 1px solid transparent;
}

.cta-btn.primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0) 70%);
    transform: translateX(-120%);
    animation: shimmer 2.8s infinite;
}

.cta-btn.primary:hover::after {
    animation-duration: 1.8s;
}

.cta-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(var(--primary-rgb), 0.25);
}

.cta-btn.secondary {
    background-color: rgba(255, 255, 255, 0.4);
    color: var(--secondary-color);
    border: 1px solid rgba(31, 41, 55, 0.12);
}

.cta-btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.75);
    transform: translateY(-2px);
}

.cta-btn.secondary i {
    color: inherit;
}

.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.stat-card {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(31, 41, 55, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-card h3 {
    margin: 2px 0 6px;
    color: var(--primary-color);
}

.stat-card span {
    color: var(--text-light);
    font-weight: 600;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
}

.eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin-bottom: 6px;
    font-weight: 700;
}

.hero-image {
    text-align: center;
}

.hero-visual {
    position: relative;
    display: inline-block;
    padding: 18px;
    border-radius: 28px;
    background: radial-gradient(circle at 30% 30%, rgba(var(--primary-rgb), 0.25), transparent 60%), rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    inset: 6%;
    background: radial-gradient(circle at 25% 25%, rgba(var(--accent-rgb), 0.25), transparent 45%), radial-gradient(circle at 80% 20%, rgba(var(--primary-rgb), 0.3), transparent 40%);
    filter: blur(26px);
    z-index: 1;
    animation: blobFloat 16s ease-in-out infinite alternate;
}

.hero-image img {
    position: relative;
    width: clamp(280px, 45vw, 420px);
    height: clamp(280px, 45vw, 420px);
    object-fit: cover;
    border-radius: 22px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.16);
    z-index: 2;
}

.floating-note {
    position: absolute;
    left: 18px;
    bottom: 18px;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 3;
    max-width: 280px;
    animation: noteFloat 6s ease-in-out infinite;
}

.note-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 0 0 6px rgba(var(--primary-rgb), 0.1);
}

.note-text {
    color: var(--secondary-color);
    margin: 0;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(240px, 0.9fr);
    gap: 40px;
    align-items: start;
    margin-top: 36px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(31, 41, 55, 0.08);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
}

.about-text p {
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 18px;
}

.stat {
    text-align: center;
    padding: 16px 12px;
    border-radius: 18px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--secondary-color);
    border: 1px solid rgba(var(--primary-rgb), 0.18);
}

.stat h3 {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat p {
    color: var(--text-light);
    font-weight: 600;
}

/* Portfolio Section */
.portfolio {
    background-color: rgba(228, 222, 213, 0.35);
}

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.filter-chip {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(31, 41, 55, 0.06);
    font-weight: 700;
    color: var(--text-color);
    border: 1px solid transparent;
}

.filter-chip.active {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-color);
    border-color: rgba(var(--primary-rgb), 0.24);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-top: 40px;
}

.portfolio-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(31, 41, 55, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.portfolio-item img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.portfolio-item:hover img {
    transform: scale(1.04);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(31, 41, 55, 0.85), transparent);
    color: white;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portfolio-overlay h3 {
    font-size: 1.15rem;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 4px;
}

.portfolio-category {
    align-self: flex-start;
    background-color: rgba(var(--primary-rgb), 0.85);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.skill-category {
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(31, 41, 55, 0.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.skill-category h3 {
    color: var(--secondary-color);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    font-size: 1.35rem;
    width: 22px;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category li:last-child {
    border-bottom: none;
}

.skill-category li i {
    color: #6fa59b;
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

/* Education Section */
.education-timeline {
    margin-top: 40px;
    position: relative;
    padding-left: 30px;
}

.education-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(var(--primary-color), rgba(192, 92, 67, 0.15));
}

.education-item {
    margin-bottom: 44px;
    position: relative;
}

.education-item::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 0 0 6px rgba(var(--primary-rgb), 0.12);
}

.education-content h3 {
    font-size: 1.35rem;
}

.education-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.education-logo {
    height: 56px;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.education-institution {
    color: var(--primary-color);
    font-weight: 700;
    margin: 4px 0 8px;
}

.education-year {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.education-text {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.affiliations-list {
    margin: 6px 0 0;
    padding-left: 20px;
    color: var(--text-light);
}

.affiliations-list li {
    padding: 4px 0;
}

/* Experience Section */
.experience {
    background-color: rgba(228, 222, 213, 0.35);
}

/* Recommendations Section */
.recommendations {
    background-color: rgba(228, 222, 213, 0.35);
}

.recommendations-content {
    margin-top: 36px;
}

.recommendation-type {
    margin-bottom: 48px;
}

.recommendation-type h3 {
    color: var(--secondary-color);
    margin-bottom: 24px;
    font-size: 1.4rem;
    text-align: center;
}

.recommendations-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.recommendation-item {
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(31, 41, 55, 0.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.2s ease;
}

.recommendation-item:hover {
    transform: translateY(-2px);
}

.recommendation-item p {
    color: var(--text-light);
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.recommendation-item strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.experience-timeline {
    margin-top: 40px;
    position: relative;
    padding-left: 30px;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(var(--primary-color), rgba(var(--primary-rgb), 0.15));
}

.experience-item {
    margin-bottom: 44px;
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 0 0 6px rgba(var(--primary-rgb), 0.12);
}

.experience-content h3 {
    font-size: 1.3rem;
    color: var(--secondary-color);
}

.experience-company-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.experience-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.7);
    padding: 4px;
}

.experience-company {
    color: var(--primary-color);
    font-weight: 700;
    margin: 6px 0 8px;
}

.experience-duration {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 10px;
    font-weight: 700;
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(255, 255, 255, 0.85));
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 36px;
}

.contact-form, .contact-info {
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(31, 41, 55, 0.1);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 18px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(31, 41, 55, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}

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

.submit-btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.28);
}

.contact-details {
    margin-bottom: 24px;
}

.contact-item {
    margin-bottom: 16px;
}

.contact-item h4 {
    color: var(--secondary-color);
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.contact-item p {
    color: var(--text-light);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.social-link:hover {
    background: rgba(var(--primary-rgb), 0.22);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 38px 0;
}

.footer p {
    margin-bottom: 8px;
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    padding-top: 60px;
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 720px;
}

#modal-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

.close-modal {
    position: absolute;
    top: 18px;
    right: 32px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #bbb;
}

#modal-caption {
    margin: 8px auto;
    width: 80%;
    max-width: 720px;
    text-align: center;
    color: #ccc;
    padding: 10px;
}

/* Hidden control portal */
.portal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    z-index: 2600;
}

.portal.open {
    display: grid;
}

.portal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 16, 24, 0.72);
    backdrop-filter: blur(6px);
}

.portal-card {
    position: relative;
    width: min(560px, 92vw);
    padding: 28px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(31, 41, 55, 0.12);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.portal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(31, 41, 55, 0.12);
    background: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.portal-kicker {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.portal-description {
    color: var(--text-light);
    margin-bottom: 18px;
}

.portal-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.portal-field label {
    font-weight: 700;
    color: var(--secondary-color);
}

.portal-field input {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(31, 41, 55, 0.14);
    font-family: inherit;
}

.portal-message {
    margin-top: 12px;
    font-weight: 700;
    color: #b45309;
    min-height: 20px;
}

.portal-controls-grid {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.portal-metric {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(31, 41, 55, 0.06);
    border: 1px solid rgba(31, 41, 55, 0.1);
}

.portal-metric-label {
    margin: 0 0 6px;
    font-weight: 700;
    color: var(--secondary-color);
}

.portal-metric-value {
    margin: 0 0 6px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

.portal-metric-note {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.portal-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(31, 41, 55, 0.06);
    border: 1px solid rgba(31, 41, 55, 0.08);
}

.portal-control-title {
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.portal-control-note {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.portal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.portal-btn {
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(31, 41, 55, 0.12);
    background: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    cursor: pointer;
}

.portal-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
}

.portal-btn.ghost {
    background: transparent;
    color: var(--secondary-color);
}

.portal-switch {
    position: relative;
    width: 48px;
    height: 26px;
    display: inline-flex;
    align-items: center;
}

.portal-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.portal-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(31, 41, 55, 0.2);
    transition: background 0.2s ease;
}

.portal-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.portal-switch input:checked + .portal-slider {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.portal-switch input:checked + .portal-slider::before {
    transform: translateX(22px);
}

.portal-open {
    overflow: hidden;
}

.portal-hide-portfolio #portfolio,
.portal-hide-contact #contact {
    display: none;
}

.portal-focus-mode .header,
.portal-focus-mode .footer {
    display: none;
}

.portal-focus-mode .back-to-top {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.dark-mode .portal-card {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.dark-mode .portal-close {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
}

.dark-mode .portal-control {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .portal-metric {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .portal-btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
}

.dark-mode .portal-btn.ghost {
    background: transparent;
}

.dark-mode .portal-field input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
}

.dark-mode .portal-message {
    color: #fbbf24;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(31, 41, 55, 0.12);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    display: grid;
    place-items: center;
    box-shadow: 0 16px 34px rgba(var(--primary-rgb), 0.25);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.94);
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease, visibility 0s linear 0.25s;
    z-index: 1500;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease;
}

.back-to-top:hover {
    box-shadow: 0 18px 38px rgba(var(--primary-rgb), 0.3);
}

.back-to-top:focus-visible {
    outline: 2px solid rgba(var(--primary-rgb), 0.35);
    outline-offset: 3px;
}

.back-to-top .fas {
    margin: 0;
}

/* Theme toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(31, 41, 55, 0.12);
    background: rgba(255, 255, 255, 0.8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 10px;
    color: var(--secondary-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

.theme-toggle .fas {
    margin: 0;
}

/* Dark mode overrides */
.dark-mode {
    color: #e5e7eb;
    background-color: #0f172a;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(var(--primary-rgb), 0.15), transparent 32%),
        radial-gradient(circle at 80% 0%, rgba(var(--accent-rgb), 0.18), transparent 28%),
        linear-gradient(135deg, rgba(19, 24, 35, 0.9), rgba(15, 23, 42, 0.95));
}

.dark-mode .header {
    background-color: rgba(15, 23, 42, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.dark-mode .nav-menu a {
    color: #e5e7eb;
}

.dark-mode .nav-menu a::after {
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}

.dark-mode .nav-toggle.active .bar:nth-child(1),
.dark-mode .nav-toggle.active .bar:nth-child(3) {
    background-color: #f8fafc;
}

.typewriter-active::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 0;
    width: 2px;
    height: 1.1em;
    background: var(--primary-color);
    animation: caretBlink 0.9s step-end infinite;
}

@keyframes caretBlink {
    50% { opacity: 0; }
}

.dark-mode .nav-cta {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.dark-mode .theme-toggle {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
}

.dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4, .dark-mode h5, .dark-mode h6 {
    color: #f5f5f5;
}

.dark-mode p, .dark-mode .section-subtitle {
    color: #cbd5e1;
}

.dark-mode .hero {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18) 0%, rgba(15, 23, 42, 0.9) 35%, rgba(var(--accent-rgb), 0.14) 100%);
}

.dark-mode .stat-card,
.dark-mode .hero-visual,
.dark-mode .floating-note,
.dark-mode .about-content,
.dark-mode .skill-category,
.dark-mode .contact-form,
.dark-mode .contact-info,
.dark-mode .portfolio-item,
.dark-mode .education-item,
.dark-mode .experience-item,
.dark-mode .recommendation-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.dark-mode .floating-note {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .floating-note .note-text,
.dark-mode .floating-note .eyebrow {
    color: #e5e7eb;
}

.dark-mode .portfolio {
    background: rgba(15, 23, 42, 0.6);
}

.dark-mode .portfolio-overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.92), transparent);
}

.dark-mode .portfolio-category,
.dark-mode .filter-chip.active {
    background: rgba(var(--primary-rgb), 0.28);
    color: #f8fafc;
    border-color: rgba(var(--primary-rgb), 0.38);
}

.dark-mode .chip {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.dark-mode .filter-chip {
    background: rgba(255, 255, 255, 0.06);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.06);
}

.dark-mode .social-link,
.dark-mode .social-link .fab {
    color: #f8fafc;
}

.dark-mode .experience,
.dark-mode .recommendations,
.dark-mode .contact {
    background: rgba(15, 23, 42, 0.7);
}

.dark-mode .contact-item p,
.dark-mode .experience-duration,
.dark-mode .education-year,
.dark-mode .education-text,
.dark-mode .stat p,
.dark-mode .skill-category li,
.dark-mode .affiliations-list li,
.dark-mode .experience-company {
    color: #cbd5e1;
}

.dark-mode .education-logo {
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45)) brightness(1.05);
    background: rgba(255, 255, 255, 0.08);
}

.dark-mode .submit-btn,
.dark-mode .cta-btn.primary {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.dark-mode .cta-btn.secondary {
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .cta-btn.secondary i {
    color: #f8fafc;
}

.dark-mode .recommendation-item strong {
    color: #f8fafc;
}

.dark-mode .footer {
    background: #0b1220;
}

.dark-mode .nav-menu.active {
    background: rgba(15, 23, 42, 0.95);
}

.dark-mode .back-to-top {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

/* Keyframe animations */
@keyframes shimmer {
    0% { transform: translateX(-120%); }
    60% { transform: translateX(120%); }
    100% { transform: translateX(120%); }
}

@keyframes blobFloat {
    0% { transform: translate3d(-6px, 4px, 0) scale(1); }
    50% { transform: translate3d(8px, -6px, 0) scale(1.04); }
    100% { transform: translate3d(-4px, -2px, 0) scale(1.02); }
}

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

/* Animation helper */
.has-js section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.has-js section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 960px) {
    .nav-menu {
        display: none;
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .nav-actions .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-menu.active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
        border-bottom-left-radius: 16px;
        border-bottom-right-radius: 16px;
        gap: 10px;
    }

    .nav-menu.active a {
        padding: 10px 0;
        border-bottom: 1px solid rgba(31, 41, 55, 0.08);
    }

    .hero {
        padding-top: 140px;
    }

    .hero-visual {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-btn {
        justify-content: center;
        width: 100%;
    }

    .hero-visual {
        padding: 14px;
    }

    .hero-image img {
        width: 100%;
        height: auto;
    }

    .floating-note {
        position: relative;
        inset: auto;
        margin-top: 12px;
    }

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

    .hero-tags {
        gap: 8px;
    }
}
