/* ====== PREMIUM PORTFOLIO v7.0 ====== */
/* Technical Elegance: Sophisticated, refined, memorable */

/* ====== PAGE-SPECIFIC OVERRIDES ====== */
:root {
    --container: 1200px;
}

/* Shared utilities (.sr-only, @font-face) now live in variables.css */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-deep);
    overflow-x: hidden;
}

/* ====== PRELOADER ====== */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: preloaderFadeOut 0.5s var(--ease-smooth) 0.9s both;
}

.preloader-logo {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.08em;
    opacity: 0;
    transform: scale(0.85);
    animation: logoReveal 0.6s var(--ease-enter) 0.15s both;
}

@keyframes logoReveal {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes preloaderFadeOut {
    from {
        opacity: 1;
        visibility: visible;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.preloader.done {
    display: none;
}

::selection {
    background: var(--accent);
    color: var(--bg-deep);
}

/* ====== AMBIENT BACKGROUND ====== */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-deep);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(196, 144, 112, 0.10) 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(196, 144, 112, 0.06) 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(100, 130, 180, 0.04) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.noise-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* ====== CONTAINER ====== */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ====== TYPOGRAPHY ====== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
    color: var(--text-secondary);
    max-width: 65ch;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ====== NAVIGATION ====== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: background var(--duration-emphasis) var(--ease-smooth);
}

.nav.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-md);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
    color: var(--bg-deep);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 700;
}

.logo-text {
    color: var(--text-primary);
}

.logo-accent {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    position: relative;
    transition: color var(--duration-micro) var(--ease-smooth),
                background var(--duration-micro) var(--ease-smooth);
}

/* Animated underline — expands from center on hover */
.nav-link:not(.nav-link-cta)::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: calc(100% - 2rem);
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform var(--duration-standard) var(--ease-out);
}

.nav-link:not(.nav-link-cta):hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Active section indicator */
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link-cta {
    background: var(--accent);
    color: var(--bg-deep) !important;
    font-weight: 600;
    margin-left: var(--space-sm);
}

.nav-link-cta:hover {
    background: var(--accent-dim);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform var(--duration-standard) var(--ease-smooth),
                opacity var(--duration-standard) var(--ease-smooth);
}

/* Mobile Menu Backdrop */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--nav-height);
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--duration-standard) var(--ease-smooth);
    -webkit-tap-highlight-color: transparent;
}

.nav-backdrop.active {
    opacity: 1;
}

@media (max-width: 1050px) {
    .nav-backdrop {
        display: block;
        pointer-events: none;
    }
    .nav-backdrop.active {
        pointer-events: auto;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--duration-micro) var(--ease-smooth),
                color var(--duration-micro) var(--ease-smooth);
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle i {
    font-size: 0.9rem;
}

/* ====== HERO SECTION ====== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-height) + var(--space-xl)) 0 var(--space-2xl);
    position: relative;
}

.hero-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.eyebrow-line {
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.eyebrow-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(196, 144, 112, 0.25);
    border-radius: var(--radius-xl);
    background: var(--accent-subtle);
}

.hero-title {
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.title-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #dbb896 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: var(--space-xl);
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

/* Buttons (.btn base is in variables.css) */
.btn-primary {
    background: var(--accent);
    color: var(--bg-deep);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 235, 210, 0.25),
        transparent
    );
    transition: none;
}

.btn-primary:hover::after {
    animation: btnShimmer 0.6s var(--ease-smooth);
}

@keyframes btnShimmer {
    from { left: -100%; }
    to { left: 150%; }
}

.btn-primary:hover {
    background: var(--accent-dim);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
}

.portrait-wrapper {
    position: relative;
    width: 340px;
    height: 340px;
}

.portrait-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent);
    border-right-color: var(--accent);
    animation: rotate 20s linear infinite;
    opacity: 0.6;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.portrait-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--bg-elevated);
}

.hero-socials {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: color var(--duration-micro) var(--ease-smooth),
                border-color var(--duration-micro) var(--ease-smooth),
                transform var(--duration-micro) var(--ease-smooth),
                box-shadow var(--duration-micro) var(--ease-smooth);
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.scroll-indicator span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; height: 40px; }
    50% { opacity: 1; height: 60px; }
}

/* ====== SECTIONS ====== */
.section {
    padding: var(--space-3xl) 0;
}

.section-alt {
    background: var(--bg-primary);
}

.section-header {
    margin-bottom: var(--space-2xl);
}

.section-header-center {
    text-align: center;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.section-title {
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
}

.section-header-center .section-subtitle {
    margin: 0 auto;
}

/* ====== ABOUT SECTION ====== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.about-lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

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

.about-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.about-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: border-color var(--duration-standard) var(--ease-smooth),
                box-shadow var(--duration-standard) var(--ease-smooth);
}

.about-card:hover {
    border-color: var(--accent);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    color: var(--accent);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: 1.25rem;
}

.about-card h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-xs);
}

.about-card p {
    font-size: 0.9375rem;
    margin: 0;
}

/* ====== EXPERIENCE SECTION ====== */
.experience-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: border-color var(--duration-standard) var(--ease-smooth),
                box-shadow var(--duration-standard) var(--ease-smooth);
}

.experience-card:hover {
    border-color: var(--accent);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.exp-company {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.company-logo {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    color: var(--accent);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
}

.company-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.company-full {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.exp-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    text-align: right;
}

.exp-role {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--accent);
}

.exp-date, .exp-location {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.exp-location i {
    margin-right: 0.25rem;
}

.exp-summary {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.exp-achievements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
}

.achievement {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.achievement-metric {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
}

.achievement-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ====== PROJECTS SECTION ====== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.project-card {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    align-items: center;
    gap: var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: transform var(--duration-standard) var(--ease-out),
                border-color var(--duration-standard) var(--ease-smooth),
                box-shadow var(--duration-standard) var(--ease-smooth);
}

.project-card:hover {
    border-color: var(--accent);
}

.project-image {
    position: relative;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-subtle), var(--bg-primary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-emphasis) var(--ease-smooth);
}

.project-card:hover .project-thumb {
    transform: scale(1.05);
}

.project-category {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--bg-deep);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.project-desc {
    font-size: 0.875rem;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-deep);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.project-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    border-radius: 50%;
    color: var(--text-muted);
    transition: transform var(--duration-standard) var(--ease-smooth),
                background var(--duration-standard) var(--ease-smooth),
                color var(--duration-standard) var(--ease-smooth);
}

.project-card:hover .project-arrow {
    background: var(--accent);
    color: var(--bg-deep);
}

/* ====== SKILLS SECTION ====== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.skill-domain {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: border-color var(--duration-standard) var(--ease-smooth),
                box-shadow var(--duration-standard) var(--ease-smooth);
}

.skill-domain:hover {
    border-color: var(--accent);
}

.domain-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.domain-header i {
    color: var(--accent);
    font-size: 1.25rem;
}

.domain-header h3 {
    font-size: 1rem;
    margin: 0;
}

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

.skill-list li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

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

.skill-list li::before {
    content: '›';
    color: var(--accent);
    font-weight: bold;
}

/* ====== EDUCATION SECTION - Timeline ====== */
.education-timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 100px;
}

.timeline-line {
    position: absolute;
    left: 70px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-dim), transparent);
}

.edu-item {
    position: relative;
    margin-bottom: var(--space-xl);
}

.edu-item:last-child {
    margin-bottom: 0;
}

.edu-marker {
    position: absolute;
    left: -100px;
    top: 0;
    width: 70px;
    text-align: right;
}

.edu-year {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--bg-deep);
    padding: 0.5rem 0;
    position: relative;
}

.edu-year::after {
    content: '';
    position: absolute;
    right: -38px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--accent);
    border: 3px solid var(--bg-deep);
    border-radius: 50%;
}

.edu-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: border-color var(--duration-standard) var(--ease-smooth),
                transform var(--duration-standard) var(--ease-smooth),
                box-shadow var(--duration-standard) var(--ease-smooth);
}

.edu-card:hover {
    border-color: var(--accent);
}

.edu-type {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    background: var(--accent-subtle);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

.edu-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.edu-school {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.edu-school i {
    margin-right: 0.5rem;
    color: var(--accent);
}

.edu-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* ====== CERTIFICATIONS SECTION ====== */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.cert-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    transition: transform var(--duration-standard) var(--ease-smooth),
                border-color var(--duration-standard) var(--ease-smooth),
                box-shadow var(--duration-standard) var(--ease-smooth);
}

.cert-card:hover {
    border-color: var(--accent);
}

.cert-active {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent-subtle), var(--bg-elevated));
}

.cert-completed {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), var(--bg-elevated));
}

.cert-completed .cert-status {
    background: #10b981;
    color: #fff;
}

.cert-completed .cert-icon {
    color: #10b981;
}

.cert-status {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--bg-deep);
    color: var(--text-muted);
}

.cert-active .cert-status {
    background: var(--accent);
    color: var(--bg-deep);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cert-active .cert-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bg-deep);
    animation: statusPulse 2s var(--ease-smooth) infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.cert-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    color: var(--accent);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
}

.cert-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.cert-card p {
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.5;
}

/* ====== CONTACT SECTION ====== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-2xl);
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color var(--duration-standard) var(--ease-smooth);
}

.contact-card:hover {
    border-color: var(--accent);
}

.contact-card i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.contact-card a,
.contact-card span {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

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

/* Contact Form */
.contact-form {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1rem 1rem 1.25rem;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--duration-micro) var(--ease-smooth),
                border-left-color var(--duration-micro) var(--ease-smooth),
                background var(--duration-micro) var(--ease-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    border-left-color: var(--accent);
    background: var(--bg-elevated);
}

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

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

.form-status {
    margin-top: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.form-status.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ====== FOOTER ====== */
.footer {
    padding: var(--space-2xl) 0 var(--space-xl);
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-bottom: var(--space-sm);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-accent {
    color: var(--accent);
}

.footer-name {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--text-secondary);
}

.footer-tagline {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.footer-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin-bottom: var(--space-md);
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ====== SCROLL PROGRESS BAR ====== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dim));
    z-index: 1001;
    transition: none;
    pointer-events: none;
}

/* ====== BACK TO TOP BUTTON ====== */
.back-to-top {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--duration-standard) var(--ease-smooth),
                visibility var(--duration-standard),
                transform var(--duration-standard) var(--ease-out),
                color var(--duration-micro) var(--ease-smooth),
                border-color var(--duration-micro) var(--ease-smooth),
                background var(--duration-micro) var(--ease-smooth);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-subtle);
}

[data-theme="light"] .back-to-top {
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ====== CARD HOVER SHIMMER ====== */
.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.03) 45%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.03) 55%,
        transparent 60%
    );
    background-size: 200% 100%;
    background-position: 200% 0;
    transition: none;
    pointer-events: none;
    z-index: 1;
}

.project-card {
    position: relative;
    overflow: hidden;
}

@media (hover: hover) {
    .project-card:hover::before {
        animation: cardShimmer 0.8s var(--ease-smooth);
    }
}

@keyframes cardShimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* ====== HOVER TRANSFORMS (pointer devices only) ====== */
@media (hover: hover) {
    .btn-primary:hover {
        transform: translateY(var(--lift-subtle));
        box-shadow: 0 8px 30px var(--accent-glow);
    }

    .social-link:hover {
        transform: translateY(var(--lift-micro));
        box-shadow: var(--shadow-glow-accent);
    }

    .project-card:hover {
        transform: translateY(var(--lift-subtle));
        box-shadow: var(--shadow-hover-card), var(--shadow-glow-accent);
    }

    .project-card:hover .project-arrow {
        transform: translateX(4px);
    }

    .edu-card:hover {
        transform: translateY(var(--lift-subtle));
        box-shadow: var(--shadow-glow-accent);
    }

    .cert-card:hover {
        transform: translateY(var(--lift-subtle));
        box-shadow: var(--shadow-glow-accent);
    }

    .about-card:hover {
        transform: translateY(var(--lift-micro));
        box-shadow: var(--shadow-glow-accent);
    }

    .skill-domain:hover {
        transform: translateY(var(--lift-micro));
        box-shadow: var(--shadow-glow-accent);
    }

    .experience-card:hover {
        box-shadow: var(--shadow-glow-accent);
    }
}

/* ====== TAP FEEDBACK ====== */
/* .btn:active base is in variables.css */

.btn-primary:active {
    transform: scale(0.97);
    filter: brightness(0.9);
    transition-duration: 0.1s;
}

.social-link:active {
    transform: scale(0.9);
    border-color: var(--accent);
    color: var(--accent);
    transition-duration: 0.1s;
}

.project-card:active {
    transform: scale(0.985);
    border-color: var(--accent);
    transition-duration: 0.1s;
}

.about-card:active {
    border-color: var(--accent);
    transition-duration: 0.1s;
}

.skill-domain:active {
    border-color: var(--accent);
    transition-duration: 0.1s;
}

.cert-card:active {
    transform: scale(0.98);
    border-color: var(--accent);
    transition-duration: 0.1s;
}

.edu-card:active {
    border-color: var(--accent);
    transition-duration: 0.1s;
}

.contact-card:active {
    border-color: var(--accent);
    transition-duration: 0.1s;
}

.nav-link:active {
    color: var(--accent);
    transition-duration: 0.1s;
}

.theme-toggle:active {
    transform: scale(0.95);
    border-color: var(--accent);
    transition-duration: 0.1s;
}

.nav-toggle:active {
    opacity: 0.7;
    transition-duration: 0.1s;
}

/* ====== TAP HIGHLIGHT SUPPRESSION ====== */
@media (pointer: coarse) {
    .btn,
    .social-link,
    .project-card,
    .cert-card,
    .about-card,
    .skill-domain,
    .edu-card,
    .contact-card,
    .nav-link,
    .theme-toggle,
    .nav-toggle {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-visual {
        order: 1;
    }
    
    .hero-eyebrow {
        justify-content: center;
    }
    
    .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .portrait-wrapper {
        width: 280px;
        height: 280px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1050px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        right: 0;
        width: 280px;
        height: calc(100vh - var(--nav-height));
        height: calc(100dvh - var(--nav-height));
        background: var(--bg-primary);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-sm);
        transform: translateX(100%);
        transition: transform var(--duration-standard) var(--ease-smooth);
        border-left: 1px solid var(--border);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-link {
        padding: 1rem 1.25rem;
        width: 100%;
        font-size: 1rem;
    }

    /* Disable underline animation in mobile menu */
    .nav-link:not(.nav-link-cta)::after {
        display: none;
    }

    .nav-link-cta {
        margin-left: 0;
        margin-top: var(--space-sm);
        text-align: center;
    }

    .theme-toggle {
        width: 100%;
        justify-content: center;
        margin-top: var(--space-sm);
    }
}

@media (max-width: 768px) {
    :root {
        --space-2xl: 2.5rem;
        --space-3xl: 3.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .exp-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .exp-meta {
        align-items: flex-start;
        text-align: left;
    }
    
    .project-card {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .project-image {
        height: 120px;
    }
    
    .project-arrow {
        display: none;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .education-timeline {
        padding-left: 80px;
    }
    
    .timeline-line {
        left: 50px;
    }
    
    .edu-marker {
        left: -80px;
        width: 50px;
    }
    
    .edu-year {
        font-size: 1rem;
    }
    
    .edu-year::after {
        right: -28px;
        width: 10px;
        height: 10px;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .portrait-wrapper {
        width: 220px;
        height: 220px;
    }
}

/* ====== LIGHT THEME COMPONENT OVERRIDES ====== */
[data-theme="light"] .ambient-bg {
    background: var(--bg-deep);
}

[data-theme="light"] .gradient-orb {
    opacity: 0.3;
}

[data-theme="light"] .orb-1 {
    background: radial-gradient(circle, rgba(122, 86, 54, 0.08) 0%, transparent 70%);
}

[data-theme="light"] .orb-2 {
    background: radial-gradient(circle, rgba(122, 86, 54, 0.05) 0%, transparent 70%);
}

[data-theme="light"] .orb-3 {
    background: radial-gradient(circle, rgba(100, 130, 180, 0.04) 0%, transparent 70%);
}

[data-theme="light"] .noise-overlay {
    opacity: 0.02;
}

[data-theme="light"] .nav.scrolled {
    background: var(--bg-glass);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .logo-mark {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
    color: #ffffff;
}

[data-theme="light"] .title-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #946f4c 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* [data-theme="light"] .btn-primary color is in variables.css */

[data-theme="light"] .btn-primary:hover {
    background: var(--accent-dim);
}

[data-theme="light"] .eyebrow-text {
    border-color: rgba(122, 86, 54, 0.25);
}

[data-theme="light"] .portrait-img {
    border-color: var(--bg-primary);
}

[data-theme="light"] .portrait-glow {
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
}

[data-theme="light"] .social-link {
    background: var(--bg-primary);
}

[data-theme="light"] .scroll-line {
    background: linear-gradient(to bottom, var(--accent), transparent);
}

[data-theme="light"] .project-tech span {
    background: var(--bg-primary);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    background: var(--bg-elevated);
}

[data-theme="light"] .timeline-line {
    background: linear-gradient(to bottom, var(--accent), var(--accent-dim), transparent);
}

[data-theme="light"] .edu-year {
    background: var(--bg-deep);
}

[data-theme="light"] .edu-year::after {
    border-color: var(--bg-deep);
}

[data-theme="light"] .cert-status {
    background: var(--bg-primary);
}

[data-theme="light"] .cert-active .cert-status {
    background: var(--accent);
    color: #ffffff;
}

[data-theme="light"] .cert-completed {
    border-color: #059669;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), var(--bg-elevated));
}

[data-theme="light"] .cert-completed .cert-status {
    background: #059669;
    color: #ffffff;
}

[data-theme="light"] .cert-completed .cert-icon {
    color: #059669;
}

[data-theme="light"] .footer {
    background: var(--bg-elevated);
}

[data-theme="light"] .footer-divider {
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* ====== REVEAL ANIMATIONS ====== */
.reveal-ready {
    opacity: 0;
    transform: var(--reveal-direction, translateY(20px));
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0s),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0s);
}

.revealed {
    opacity: 1;
    transform: none;
}

/* ====== NAV TOGGLE ANIMATION ====== */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ====== PAGE ENTRANCE ====== */
@keyframes heroBreathIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-eyebrow {
    animation: heroBreathIn 0.6s var(--ease-enter) calc(var(--entrance-offset) + 0.1s) both;
}

.hero-title {
    animation: heroBreathIn 0.6s var(--ease-enter) calc(var(--entrance-offset) + 0.2s) both;
}

.hero-description {
    animation: heroBreathIn 0.6s var(--ease-enter) calc(var(--entrance-offset) + 0.3s) both;
}

.hero-actions {
    animation: heroBreathIn 0.6s var(--ease-enter) calc(var(--entrance-offset) + 0.4s) both;
}

.hero-stats {
    animation: heroBreathIn 0.6s var(--ease-enter) calc(var(--entrance-offset) + 0.5s) both;
}

.hero-visual {
    animation: heroBreathIn var(--duration-entrance) var(--ease-enter) calc(var(--entrance-offset) + 0.15s) both;
}

.scroll-indicator {
    animation: heroBreathIn var(--duration-entrance) var(--ease-enter) calc(var(--entrance-offset) + 0.3s) both;
}

/* Skip entrance on back/forward navigation */
.skip-entrance .preloader {
    display: none;
}

.skip-entrance .hero-eyebrow,
.skip-entrance .hero-title,
.skip-entrance .hero-description,
.skip-entrance .hero-actions,
.skip-entrance .hero-stats,
.skip-entrance .hero-visual,
.skip-entrance .scroll-indicator {
    animation: none;
}

/* ====== REDUCED MOTION ====== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
