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

:root {
    --primary-color: #ffffff;
    --secondary-color: #a1a1aa;
    --accent-color: #3b82f6;
    --bg-dark: #09090b;
    --bg-card: #18181b;
    --bg-hover: #27272a;
    --border-color: #27272a;
    --text-primary: #e4e4e7;
    --text-secondary: #71717a;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated grain background */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
    animation: drift 20s linear infinite;
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

/* ========== HEADER STYLES ========== */
header {
    text-align: center;
    padding: 100px 20px 80px;
    position: relative;
    animation: slideDown 0.8s var(--transition-smooth);
}

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

header h1 {
    font-size: 4.5em;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: 2px;
    animation: fadeInScale 1s var(--transition-smooth) 0.2s both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

header p {
    font-size: 1.3em;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 25px;
    font-family: 'Orbitron', sans-serif;
    animation: fadeInScale 1s var(--transition-smooth) 0.3s both;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
    font-size: 0.95em;
    animation: fadeInScale 1s var(--transition-smooth) 0.4s both;
}

.contact-item {
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
}

.contact-item:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.contact-item a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* ========== SOCIAL LINKS ========== */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    animation: fadeInScale 1s var(--transition-smooth) 0.5s both;
}
.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: 1.3em;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px;
}
.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width var(--transition-normal), height var(--transition-normal);
}
.social-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.social-link:hover::before {
    width: 100px;
    height: 100px;
}
/* ========== BUTTONS ========== */
.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    animation: fadeInScale 1s var(--transition-smooth) 0.6s both;
}
.contact-btn,
.cv-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(39, 39, 46, 0.5) 100%);
    border: 1px solid var(--border-color);
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    transition: all var(--transition-normal);
    font-size: 0.9em;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px;
}
.contact-btn::before,
.cv-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-normal);
}
.contact-btn:hover,
.cv-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}
.contact-btn:hover::before,
.cv-button:hover::before {
    left: 100%;
}

/* ========== NAVIGATION TABS ========== */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
    overflow-x: auto;
    animation: slideUp 0.6s var(--transition-smooth);
    scroll-behavior: smooth;
}

.nav-tab {
    padding: 15px 30px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1em;
    cursor: pointer;
    transition: all var(--transition-normal);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    position: relative;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav-tab::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    transition: width var(--transition-normal);
}

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

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

.nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: transparent;
}

.nav-tab.active::after {
    width: 100%;
    background: var(--primary-color);
}

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

/* ========== CONTENT SECTIONS ========== */
.content-section {
    display: none;
    animation: fadeInUp 0.6s var(--transition-smooth);
    opacity: 0;
}

.content-section.active {
    display: block;
    animation: fadeInUp 0.6s var(--transition-smooth) forwards;
    opacity: 1;
}

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

/* ========== CARD STYLES ========== */
.card {
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.8) 0%, rgba(24, 24, 27, 0.6) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 35px;
    margin-bottom: 25px;
    transition: all var(--transition-normal);
    border-radius: 12px;
    animation: fadeInUp 0.6s var(--transition-smooth);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(59, 130, 246, 0.15);
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.95) 0%, rgba(24, 24, 27, 0.8) 100%);
}

.card h2 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    animation: slideRight 0.6s var(--transition-smooth);
}

.card h3 {
    color: var(--text-primary);
    font-size: 1.3em;
    margin-bottom: 12px;
    font-weight: 500;
    font-family: 'Orbitron', sans-serif;
    transition: color var(--transition-normal);
}

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

.card p {
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.7;
}

.card ul {
    list-style: none;
    padding: 0;
}

.card ul li {
    color: var(--secondary-color);
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
    transition: all var(--transition-fast);
}

.card ul li:hover {
    color: var(--text-primary);
    padding-left: 30px;
}

.card ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    transition: all var(--transition-fast);
    font-weight: bold;
}

.card ul li:hover::before {
    transform: translateX(5px);
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========== GRID LAYOUTS ========== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

/* ========== SKILL ITEMS ========== */
.skill-item {
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.8) 0%, rgba(39, 39, 46, 0.4) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    text-align: center;
    font-size: 0.95em;
    color: var(--text-primary);
    transition: all var(--transition-normal);
    font-weight: 500;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.skill-item:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.95) 0%, rgba(59, 130, 246, 0.1) 100%);
}

.skill-item:hover::before {
    transform: scaleX(1);
}

/* ========== SPEC LIST ========== */
.spec-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
}

.spec-item:hover {
    padding: 12px 8px;
    padding-left: 0;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--text-secondary);
    font-size: 0.9em;
    transition: color var(--transition-fast);
}

.spec-item:hover .spec-label {
    color: var(--accent-color);
}

.spec-value {
    color: var(--text-primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.spec-item:hover .spec-value {
    color: var(--primary-color);
}

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(39, 39, 46, 0.8) 100%);
    color: var(--text-primary);
    font-size: 0.85em;
    margin-right: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.badge:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(59, 130, 246, 0.2) 100%);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* ========== HIGHLIGHT BOX ========== */
.highlight {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9) 0%, rgba(42, 42, 42, 0.7) 100%);
    border-left: 3px solid var(--accent-color);
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.1);
}

.highlight:hover {
    border-left-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15);
}

.highlight h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
    transition: color var(--transition-fast);
}

.highlight:hover h3 {
    color: var(--accent-color);
}

.highlight p {
    color: var(--secondary-color);
    transition: color var(--transition-fast);
}

.highlight:hover p {
    color: var(--text-primary);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5em;
    }

    header p {
        font-size: 1.1em;
    }

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

    .nav-tabs {
        justify-content: flex-start;
        gap: 5px;
    }

    .nav-tab {
        padding: 12px 20px;
        font-size: 0.9em;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .contact-info {
        flex-direction: column;
        gap: 10px;
        font-size: 0.9em;
    }

    .card {
        padding: 25px;
    }

    .button-container {
        flex-direction: column;
        width: 100%;
    }

    .contact-btn,
    .cv-button {
        width: 100%;
        justify-content: center;
    }
}

/* ========== PROGRESS BAR ========== */
.skill-name {
    display: block;
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #60a5fa);
    border-radius: 2px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1), box-shadow var(--transition-normal);
}

.skill-item:hover .progress-fill {
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

/* ========== SCROLL BEHAVIOR ========== */
html {
    scroll-behavior: smooth;
}

/* ========== LINK STYLING ========== */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

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

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width var(--transition-normal);
}

a:hover::after {
    width: 100%;
}

/* ========== LOADING ANIMATION ========== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========== FOCUS STATES FOR ACCESSIBILITY ========== */
button:focus,
a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
/* Supplementary styles for improved HTML structure */
/* Add these to your existing style.css file */

/* Visually hidden content (accessible to screen readers) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header improvements */
.header-subtitle {
    /* Add any specific styling for the subtitle */
}

/* About text */
.about-text {
    font-size: 1.1em;
    line-height: 1.8;
}

/* Highlight section improvements */
.highlight-title {
    color: #fff;
    margin-bottom: 15px;
}

/* Availability section */
.availability-section {
    margin-top: 15px;
}

.availability-status {
    /* Add dynamic color classes via JavaScript if needed */
}

.current-time {
    display: block;
    margin-top: 10px;
    color: #71717a;
    font-size: 0.9em;
    font-style: normal;
}

/* Role information */
.role-title {
    font-weight: bold;
}

.role-period {
    color: #71717a;
}

/* Projects section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.project-link {
    display: inline-block;
    margin-bottom: 10px;
    color: #3b82f6;
    text-decoration: underline;
    font-size: 0.9em;
}

.project-tech {
    margin-top: 10px;
    color: #71717a;
    font-size: 0.95em;
}

.project-features {
    margin-top: 5px;
    color: #71717a;
    font-size: 0.9em;
    font-style: italic;
}

/* Tools badges */
.tools-badges {
    margin-top: 20px;
}

/* Education section */
.education-details {
    margin-top: 25px;
}

.education-content {
    margin-top: 30px;
}

.education-content h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
}

/* Workstation section */
.workstation-subtitle {
    margin-bottom: 20px;
    color: #71717a;
}

/* Ensure spec-list items have proper spacing */
.spec-list {
    margin-top: 15px;
}

/* Accessibility improvements for stars */
.stars[aria-label] {
    /* Ensure aria-label is readable by screen readers */
}

/* Main content wrapper */
main {
    /* Add any main-specific styles if needed */
}

/* Section spacing */
.content-section {
    /* Consistent spacing between sections */
}

/* Navigation improvements */
nav[role="navigation"] {
    /* Semantic navigation styles */
}

/* Address element reset */
address {
    font-style: normal;
}

/* Improved focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Skip to main content link (add to HTML if needed) */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}
