:root {
    --primary: #7C3AED;
    --background: #0F172A;
    --text: #F8FAFC;
    --surface: #1E293B;
    --surface-variant: #334155;
    --text-secondary: #94A3B8;
    --border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: 'Work Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .title-font {
    font-family: 'Playfair Display', Georgia, serif;
}

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

.section {
    padding: 100px 0;
    opacity: 0;
    transform: translateY(30px);
}

.section.visible {
    animation: fadeUp 0.8s ease forwards;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 10000;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--text);
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 1rem;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
}

.header.scrolled {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.btn-hire {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-hire:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
}

.btn-hire:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.hamburger:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 80px;
}

.avatar-container {
    position: relative;
    margin-bottom: 2rem;
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    padding: 5px;
    animation: pulse 3s infinite ease-in-out;
}

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--primary);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-desc {
    max-width: 600px;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.1rem);
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-primary:focus-visible {
    outline: 3px solid var(--text);
    outline-offset: 2px;
}

.btn-outline {
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-grid > div:first-child {
    justify-self: start;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
    position: relative;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 60px;
    height: 4px;
    background: var(--primary);
}

.about-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 8px 8px 0px rgba(124, 58, 237, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image:hover {
    transform: translate(-2px, -2px);
    box-shadow: 12px 12px 0px rgba(124, 58, 237, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
}

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

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--surface);
    padding: 2rem 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid transparent;
    transition: var(--transition);
    cursor: default;
}

.skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.1);
}

.skill-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
}

.skill-icon svg {
    width: 100%;
    height: 100%;
}

.skill-name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.1);
}

.project-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-content {
    padding: 2rem;
}

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

.tag {
    font-size: 0.7rem;
    background: rgba(124, 58, 237, 0.12);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.25rem 0;
}

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

.project-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.featured-project {
    grid-column: 1 / -1;
    max-width: 720px;
    margin: 0 auto;
}

.side-project {
    grid-column: span 4;
}

.full-project {
    grid-column: span 12;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-form {
    background: var(--surface);
    padding: 3rem;
    border-radius: 12px;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.form-input,
.form-textarea {
    width: 100%;
    background: var(--background);
    border: 2px solid var(--border);
    padding: 1rem;
    color: var(--text);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-input.error,
.form-textarea.error {
    border-color: #EF4444;
}

.form-input.error:focus,
.form-textarea.error:focus {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    min-height: 48px;
}

.btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-submit:focus-visible {
    outline: 3px solid var(--text);
    outline-offset: 2px;
}

.btn-submit.sent {
    background: #10B981;
}

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    padding: 0.25rem 0;
}

.social-links a:hover {
    color: var(--primary);
}

.social-links a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Utilities */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mt-1 {
    margin-top: 1rem;
}

.fw-700 {
    font-weight: 700;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0px rgba(124, 58, 237, 0);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .featured-project,
    .side-project {
        grid-column: span 12;
    }

    .full-project {
        grid-template-columns: 1fr;
    }

    .full-project .project-img {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: var(--surface);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        transition: right 0.3s ease;
        z-index: 150;
        border-left: 1px solid var(--border);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .hamburger {
        display: flex;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

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

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

    .contact-form {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

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

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

    .contact-form {
        padding: 1.5rem;
    }

    .info-item {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 6rem 0 2rem;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-desc {
        display: none;
    }
}

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

    .avatar {
        animation: none;
    }

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