/* ===== CSS VARIABLES ===== */
:root {
    --primary: #0f172a;
    --secondary: #1e293b;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --success: #10b981;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(148, 163, 184, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, #1a1f3a 50%, var(--secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== UTILITIES ===== */
a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ===== HEADER / HERO SECTION ===== */
header {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.9),
        rgba(30, 41, 59, 0.8)
    ),
    radial-gradient(
        ellipse at top right,
        rgba(6, 182, 212, 0.15) 0%,
        transparent 50%
    );
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1), transparent);
    border-radius: 50%;
    z-index: 0;
    animation: float 6s ease-in-out infinite;
}

header::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.08), transparent);
    border-radius: 50%;
    z-index: 0;
    animation: float 8s ease-in-out infinite reverse;
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
}

.profile-wrapper {
    position: relative;
    width: 190px;
    height: 190px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    padding: 6px;
    background: conic-gradient(
        from 180deg,
        rgba(34, 211, 238, 0.2),
        rgba(6, 182, 212, 0.9),
        rgba(34, 211, 238, 0.2)
    );
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.28),
        0 0 45px rgba(6, 182, 212, 0.28);
    animation: profile-float 6s ease-in-out infinite;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.profile-wrapper:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow:
        0 24px 42px rgba(0, 0, 0, 0.34),
        0 0 55px rgba(34, 211, 238, 0.4);
}

.profile-wrapper::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(34, 211, 238, 0.28);
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.profile-wrapper:hover::before {
    opacity: 1;
    transform: scale(1.02);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(15, 23, 42, 0.8);
    display: block;
}

.hero-subtitle {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 1.5rem;
    animation: slideDown 0.8s ease-out 0.1s both;
}

h1 {
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideDown 0.8s ease-out 0.2s both;
    line-height: 1.1;
}

.hero-tagline {
    display: inline-block;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    margin: 1.5rem 0;
    max-width: 700px;
    animation: slideDown 0.8s ease-out 0.3s both;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    animation: slideUp 0.8s ease-out 0.4s both;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-links a:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.3);
}

/* ===== MAIN SECTIONS ===== */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

section-title,
h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-bottom: 1rem;
}

section-title::after,
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-light), transparent);
    border-radius: 2px;
}

/* ===== EXPERIENCE SECTION ===== */
.experience-container {
    position: relative;
    padding-left: 2rem;
}

.experience-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
}

.experience-item {
    margin-bottom: 3rem;
    padding-left: 2rem;
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 0.3rem;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 3px var(--accent);
}

.experience-header {
    margin-bottom: 0.75rem;
}

.job-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-light);
}

.company {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    font-size: 1rem;
    margin: 0.5rem 0;
}

.duration {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.company-logo {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.company-logo img {
    height: 22px;
    width: auto;
    border-radius: 4px;
    object-fit: contain;
    vertical-align: middle;
}

.job-description {
    color: var(--text-secondary);
    margin-top: 1rem;
}

.job-description ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
    list-style: none;
}

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

.job-description li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* ===== PROJECTS SECTION ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(34, 211, 238, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    backdrop-filter: blur(4px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(6, 182, 212, 0.15);
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-light);
    margin: 0;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.project-stack {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: var(--accent-light);
}

.project-year {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.project-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

.project-metric {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.project-metric::before {
    content: '📈';
    flex-shrink: 0;
    font-size: 1rem;
}

.project-metric strong {
    color: #34d399;
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.skill-category {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(34, 211, 238, 0.05));
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(4px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-category:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(34, 211, 238, 0.1));
    box-shadow: 0 15px 40px rgba(6, 182, 212, 0.15);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-light);
}

.skill-icon {
    font-size: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-light);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--accent);
    color: var(--primary);
    transform: scale(1.05);
}

.skill-tag i {
    font-size: 0.95rem;
    vertical-align: middle;
    line-height: 1;
}

/* ===== EDUCATION SECTION ===== */
.education-item {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(34, 211, 238, 0.05));
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(4px);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.education-item:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.1);
}

.degree {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 0.5rem;
}

.university {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.education-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ===== CARDS ===== */
.card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.7));
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(6, 182, 212, 0.1);
}

#summary .card {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ===== FADE IN ===== */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(30px);
    }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    header {
        min-height: auto;
        padding: 2rem 1.5rem;
    }

    .profile-wrapper {
        width: 145px;
        height: 145px;
        margin-bottom: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    section {
        padding: 3rem 1.5rem;
    }

    .contact-links {
        gap: 1rem;
    }

    .contact-links a {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

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

    .experience-container {
        padding-left: 1rem;
    }

    .experience-item {
        padding-left: 1.5rem;
    }

    .experience-item::before {
        left: -0.6rem;
    }
}

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