/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --viewport-height: 100vh;

    /* Color palette */
    --color-darkest:     #0f172a;
    --color-dark:        #1e293b;
    --color-secondary:   #475569;
    --color-text:        #64748b;
    --color-muted:       #94a3b8;
    --color-border-soft: #cbd5e1;
    --color-border:      #e2e8f0;
    --color-bg-light:    #f1f5f9;
    --color-bg:          #f8fafc;
}

@supports (height: 100dvh) {
    :root {
        --viewport-height: 100dvh;
    }
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--color-bg-light);
}

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

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: var(--color-secondary);
}

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

.nav-link {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-dark);
    transition: width 0.3s ease;
}

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

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
  position: relative;
  width: 44px;
  height: 44px;
}

.hamburger span {
  width: 26px;
  height: 2.5px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  position: absolute;
}

.hamburger span:nth-child(1) {
  transform: translateY(-8px);
}

.hamburger span:nth-child(2) {
  transform: translateY(0);
}

.hamburger span:nth-child(3) {
  transform: translateY(8px);
}

.hamburger.active {
  position: fixed;
  top: 16px;
  right: 16px;
}

.hamburger.active span {
  background: var(--color-darkest);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(0);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(0);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: var(--viewport-height);
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-border) 100%);
    color: var(--color-dark);
    padding-top: 80px;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--color-darkest);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: var(--color-text);
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-primary {
    background: var(--color-dark);
    color: white;
}

.btn-primary:hover {
    background: var(--color-darkest);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 41, 59, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--color-dark);
    border: 2px solid var(--color-dark);
}

.btn-secondary:hover {
    background: var(--color-dark);
    color: white;
    transform: translateY(-2px);
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-darkest);
}

/* About Section */
.about {
    background: #ffffff;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
    line-height: 1.8;
}

.skills {
    margin-top: 2rem;
}

.skills h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-darkest);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill-tag {
    background: var(--color-bg-light);
    color: var(--color-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.skill-tag:hover {
    transform: none !important;
    background-color: var(--color-border);
    color: var(--color-dark);
}

/* Projects Section */
.projects {
    background: var(--color-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.project-card.interactive-card {
    cursor: pointer;
}

.project-card.interactive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 41, 59, 0.1), transparent);
    transition: left 0.5s ease;
}

.project-card.interactive-card:hover::before {
    left: 100%;
}

.project-header {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-dark), var(--color-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.project-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--color-darkest);
    margin-bottom: 0.5rem;
    flex: 1;
}

.project-card:has(.top-bar-badge) {
    padding-top: 2.8rem;
}

/* Top bar badge */
.top-bar-badge {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: white;
    background: var(--color-dark);
    padding: 5px 0;
    z-index: 1;
}

.company {
    color: var(--color-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-align: right;
    max-width: 40%;
}

.project-card p {
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-preview {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.project-preview--large {
    height: 250px;
}

.project-preview--video {
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.project-preview--app {
    background: linear-gradient(135deg, var(--color-bg-light), var(--color-border));
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 270px;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.app-screenshot {
    min-width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn--prev {
    left: 10px;
}

.carousel-btn--next {
    right: 10px;
}

.carousel-btn i {
    color: var(--color-dark);
    font-size: 1rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: rgba(255, 255, 255, 1);
    width: 24px;
    border-radius: 4px;
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.modal-nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.modal-nav-btn--prev {
    left: 20px;
}

.modal-nav-btn--next {
    right: 20px;
}

.modal-nav-btn i {
    color: var(--color-dark);
    font-size: 1.5rem;
}

.preview-placeholder {
    background: linear-gradient(135deg, var(--color-bg-light), var(--color-border));
    border: 2px dashed var(--color-border-soft);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 200px;
    position: relative;
}

.preview-placeholder:hover {
    background: linear-gradient(135deg, var(--color-border), var(--color-border-soft));
    border-color: var(--color-muted);
    transform: scale(1.02);
}

.preview-media {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    -webkit-tap-highlight-color: transparent;
}

.contained-image {
    object-fit: contain;
    background-color: transparent;
    box-shadow: none;
}

.preview-overlay {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 41, 59, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

.preview-placeholder i {
    font-size: 3rem;
    color: var(--color-secondary);
}

.preview-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-placeholder span {
    font-weight: 600;
    color: var(--color-secondary);
    font-size: 1rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech {
    background: var(--color-bg-light);
    color: var(--color-secondary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
}

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

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    background: var(--color-dark);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--color-dark);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.project-link:hover {
    background: var(--color-darkest);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
}

.project-link.disabled {
    background: var(--color-bg-light);
    color: var(--color-muted);
    border-color: var(--color-border);
    cursor: not-allowed;
    position: relative;
}

.project-link.disabled:hover {
    transform: none;
    box-shadow: none;
    background: var(--color-bg-light);
}

.project-link.disabled::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--color-dark);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.project-link.disabled::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 6px solid transparent;
    border-top-color: var(--color-dark);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.project-link.disabled:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

.project-link.disabled:hover::before {
    opacity: 1;
}

.project-link i {
    font-size: 1rem;
}

/* Contact Section */
.contact {
    background: #ffffff;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--color-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-secondary);
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--color-dark);
    background: white;
}

.social-link i {
    font-size: 1.5rem;
    width: 24px;
}

.x-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.contact-form {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-dark);
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}

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

/* Footer */
.footer {
    background: var(--color-darkest);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */

/* Tablet and smaller laptops */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .container {
        padding: 0 24px;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    /* Mobile Navigation */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: 0;
        top: -100%;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        height: 100vh;
        height: var(--viewport-height);
        text-align: center;
        transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.4s;
        box-shadow: none;
        padding: 0;
        gap: 0;
        z-index: 1001;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow-y: auto;
        visibility: hidden;
    }

    .nav-menu.active {
        top: 0;
        visibility: visible;
        transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
        pointer-events: none;
        z-index: -1;
    }

    .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
    }

    .nav-item {
        margin: 0;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-menu.active .nav-item {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-menu.active .nav-item:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-menu.active .nav-item:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav-menu.active .nav-item:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav-menu.active .nav-item:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav-menu.active .nav-item:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-link {
        display: block;
        padding: 1.5rem;
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--color-dark);
    }

    .nav-link:hover {
        color: var(--color-darkest);
        background: rgba(30, 41, 59, 0.05);
    }

    .nav-link::after {
        display: none;
    }

    /* Container padding */
    .container {
        padding: 0 16px;
    }

    /* Hero Section */
    .hero {
        padding: 60px 0;
        min-height: calc(100vh - 73px);
    }

    .hero-container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 3rem;
        margin-bottom: 1.25rem;
    }

    .hero-subtitle {
        font-size: 1.35rem;
    }

    .hero-description {
        font-size: 1.05rem;
        margin-bottom: 2rem;
        padding: 0 10px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 14px 24px;
        font-size: 1.05rem;
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    /* About Section */
    .about-text p {
        font-size: 1.05rem;
    }

    .skill-tags {
        justify-content: center;
        gap: 0.75rem;
    }

    .skill-tag {
        padding: 10px 18px;
        font-size: 0.95rem;
    }

    /* Projects Section */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 1.75rem;
    }

    .project-preview--app {
        height: 300px;
    }

    .carousel-btn {
        width: 44px;
        height: 44px;
    }

    .carousel-btn i {
        font-size: 1.1rem;
    }

    .project-links {
        gap: 0.75rem;
    }

    .project-link {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        padding: 10px 14px;
    }

    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info p {
        font-size: 1.05rem;
    }

    .social-links {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 0.75rem;
    }

    .social-link {
        padding: 1.25rem;
        justify-content: center;
    }

    /* Modal Navigation */
    .modal-nav-btn {
        width: 44px;
        height: 44px;
    }

    .modal-nav-btn--prev {
        left: 10px;
    }

    .modal-nav-btn--next {
        right: 10px;
    }

    .close-modal {
        font-size: 35px;
        right: 20px;
        top: 10px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .nav-menu {
        top: 65px;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .btn {
        max-width: 100%;
        padding: 12px 20px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-header h3 {
        font-size: 1.05rem;
    }

    .project-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .tech {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .project-preview--app {
        height: 280px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn--prev {
        left: 5px;
    }

    .carousel-btn--next {
        right: 5px;
    }

    .social-links {
        align-items: stretch;
    }

    .social-link {
        padding: 1rem;
    }

    .copy-tooltip {
        left: 50%;
        transform: translateX(-50%);
        top: -40px;
        font-size: 0.85rem;
    }
}

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

.project-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Modal Styles */
.modal {
    display: flex;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0);
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s, background-color 0.3s ease;
}

.modal.open {
    visibility: visible;
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.open .modal-content {
    transform: scale(1);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--color-bg-light);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--color-muted);
    text-decoration: none;
}

/* Smooth scrolling for anchor links */
html {
    scroll-padding-top: 80px;
}

.copy-tooltip {
    display: none;
    position: absolute;
    left: 88%;
    top: 11px;
    transform: translateX(-88%);
    background: var(--color-dark);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 10;
    white-space: nowrap;
}

.copy-tooltip.show {
    display: block;
    opacity: 1;
}